A brief description of what your plugin does.
This plugin provides [describe main functionality here]. It is built with a modular architecture following WordPress best practices.
You can create a new plugin from this template using Composer:
composer create-project devkabir/wordpress-plugin my-new-pluginThe setup script will automatically run and prompt you for:
- Plugin Name
- Plugin Slug
- Plugin Description
- Plugin URI
- Author Name
- Author Email
- Author URI
- Package Namespace
All placeholder values in the template will be automatically replaced with your inputs.
If you prefer to set up manually or need to run the setup again:
composer run setupOr run the setup script directly:
php setup.php- Modular architecture with separate Admin, Frontend, and Common components
- PSR-4 autoloading
- WordPress coding standards compliant
- Easy customization through hooks and filters
- Clean uninstall process
- WordPress 5.8 or higher
- PHP 7.4 or higher
- Composer (for installation and development)
composer create-project devkabir/wordpress-plugin my-plugin-name
cd my-plugin-name
composer install- Download the plugin files
- Upload the plugin folder to
/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Configure the plugin settings if needed
wordpress-plugin/
├── includes/
│ ├── Admin/ # Admin-specific functionality
│ ├── Common/ # Shared functionality
│ ├── Frontend/ # Frontend-specific functionality
│ ├── autoload.php # Autoloader for plugin classes
│ ├── constants.php # Plugin constants
│ ├── filters.php # Filter hooks
│ └── hooks.php # Action hooks
├── plugin.php # Main plugin file
├── uninstall.php # Cleanup on uninstall
├── composer.json # Composer configuration
├── setup.php # Interactive setup script (auto-removed after setup)
└── README.md # This file
This plugin follows a modular architecture with separate components for:
- Admin: Backend/admin panel functionality
- Frontend: Public-facing features
- Common: Shared utilities and helpers
The plugin provides various hooks and filters for extensibility. See includes/hooks.php and includes/filters.php for available hooks.
The plugin uses PSR-4 autoloading. All classes in the includes/ directory are automatically loaded based on their namespace.
Install development dependencies:
composer install --devThis includes:
- PHPUnit for testing
- WordPress Coding Standards (WPCS)
- Initial release
This plugin is licensed under the GPL v2 or later.
Copyright (C) [Year] [Your Name]
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
For support, please [contact method or issue tracker link].
Contributions are welcome! Please feel free to submit a Pull Request.
Developed by [Your Name]