npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

wp-plugin-init

v2.0.2

Published

CLI to scaffold a PHP plugin boilerplate structure

Readme

# wp-plugin-init

`Modern WordPress Plugin Boilerplate Generator`
Scaffold a complete WordPress plugin powered by PHP OOP, Composer, Vue.js, Vite, and MVC architecture — with a single command.

---

## What is wp-plugin-init?

`wp-plugin-init` is a CLI tool that instantly bootstraps a modern, scalable, and production-ready WordPress plugin boilerplate.  
It’s ideal for developers who want to:

- Use `Object-Oriented PHP` and `PSR-4 autoloading`
- Structure plugins with `MVC architecture`
- Integrate a modern `JavaScript frontend` powered by `Vue 3 + Vite`
- Maintain clean, namespaced code with `Composer`

---

## Features

✅ Automatic namespace generation based on your plugin name  
✅ Composer-ready with PSR-4 autoloading  
✅ Vue 3 + Vite-based frontend development workflow  
✅ Clean MVC file structure  
✅ Auto-configured constants, file paths, and menu slugs  
✅ Dashboard admin page setup  
✅ Instantly replaces placeholders across all files  
✅ Works with `Node.js`, `npm`, and `composer`

---

## Requirements

- `Node.js` v14+
- `Composer`
- `PHP` 7.4 or later
- `npm` (for frontend tooling)

---

## Installation

Install globally via npm:

```bash
npm install -g wp-plugin-init

Usage

Run the generator with your desired plugin name:

wp-plugin-init my-awesome-plugin

This will:

  • Create a folder named my-awesome-plugin
  • Set up PHP namespace MyAwesomePlugin
  • Replace all references in PHP/JS files
  • Generate constants like MY_AWESOME_PLUGIN_VERSION
  • Prepare the admin dashboard menu
  • Install composer.json and frontend assets folder

Example Output

Command:

wp-plugin-init suite-one

Result:

  • Namespace: SuiteOne\\
  • Main File: suite-one.php
  • Constants: SUITE_ONE_PATH, SUITE_ONE_VERSION
  • Admin Menu: “Suite One”
  • Folder: /suite-one/app, /suite-one/public/assets
  • Vue 3 and Vite pre-configured

Boilerplate Structure

suite-one/
├── app/
│   ├── Controllers/
│   ├── Models/
│   ├── Views/
│   └── App.php
├── public/
│   └── assets/
├── resources/
│   └── js/           # Vue 3 + Vite entry
├── vite.config.js
├── composer.json
├── package.json
├── suite-one.php     # Main plugin file
└── README.md

Technologies Used

  • PHP 7.4+ (OOP, Namespaces)
  • Composer (PSR-4 Autoloading)
  • Vue 3 (Composition API)
  • Vite (Hot Module Replacement, fast builds)
  • MVC pattern
  • WordPress Plugin API

After Generation

Inside the new plugin folder:

composer install
npm install
npm run dev     # Start Vite dev server
npm run build   # Build assets for production

Customization

All text and identifiers are automatically generated from your input plugin name:

  • plugin-name → file/folder slugs
  • PluginName → PHP namespace
  • PLUGIN_NAME → constants
  • Dashboard labels, menu titles, and slugs

You can customize this behavior by modifying the generated boilerplate.


Philosophy

This project aims to combine the best of modern PHP architecture and JavaScript frontend tooling for WordPress plugin developers, giving you a clean, scalable starting point for any project.


License

MIT © 2025 Ruman Ahmed

2.0.2

Latest Build is Powerful


🤝 Contributing

Contributions are welcome! Feel free to open issues, submit PRs, or suggest features.