This guide covers local development setup, testing, and code quality tools for the Microsub plugin.
This plugin includes a wp-env configuration for local development.
npm install
npm startThe local environment will be available at http://localhost:8686.
# Start the environment
npm start
# Stop the environment
npm stop
# Destroy the environment (removes all data)
npm run destroyThe plugin uses PHPUnit for testing.
composer installcomposer test# Run a specific test file
composer exec phpunit -- --filter TestClassName
# Run tests with coverage
composer exec phpunit -- --coverage-html coverage/The plugin follows WordPress Coding Standards.
# Check for coding standard violations
composer lint
# Automatically fix violations where possible
composer lint:fixPHPCS configuration is defined in phpcs.xml. The plugin uses:
- WordPress coding standards
- PHPCompatibilityWP for PHP version compatibility
- VariableAnalysis for unused variable detection
Add to your wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );Debug output is written to wp-content/debug.log.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request