WP Manifestindependent plugin directory
manifest / developer / my-wordpress-plugin

My WordPress Plugin

Sample WordPress plugin with GitHub Actions CI.

by MD Siddiqur Rahman · github.com/siddik-web/my-wordpress-plugin

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/siddik-web/my-wordpress-plugin/archive/refs/heads/main.zip

A sample WordPress plugin demonstrating modern development practices, including PSR-4 autoloading, WordPress Coding Standards (WPCS), and automated CI with GitHub Actions.

Features

  • PSR-4 Autoloading: Uses Composer for efficient class loading.
  • WordPress Coding Standards: Configured with PHPCS and WPCS for high-quality, consistent code.
  • Automated Testing: Includes PHPUnit for unit testing.
  • GitHub Actions CI: Continuous Integration workflow that runs linting and tests on every push.

Requirements

  • PHP: 7.0 or higher
  • Composer
  • WordPress: 5.0 or higher (recommended)

Installation

  1. Clone the repository into your WordPress plugins directory:
    git clone https://github.com/siddik-web/my-wordpress-plugin.git
  2. Navigate to the plugin directory:
    cd my-wordpress-plugin
  3. Install dependencies:
    composer install
  4. Activate the plugin through the WordPress Admin dashboard.

Development

Coding Standards

This project follows the WordPress Coding Standards.

  • Check for issues:
    composer phpcs
  • Automatically fix issues:
    composer phpcbf

Running Tests

Unit tests are written with PHPUnit.

composer test

Project Structure

  • src/: Contains the plugin's core PHP classes (PSR-4).
  • tests/: Unit tests for the plugin.
  • my-wordpress-plugin.php: Main plugin entry file.
  • phpcs.xml: Configuration for PHP_CodeSniffer.
  • phpunit.xml.dist: Configuration for PHPUnit.
  • .github/workflows/: GitHub Actions CI configuration.

License

This project is licensed under the GPL-2.0-or-later License.

Author