Skip to content

WordPress Standards#2

Closed
jasperf wants to merge 24 commits into
mainfrom
wp-standards
Closed

WordPress Standards#2
jasperf wants to merge 24 commits into
mainfrom
wp-standards

Conversation

@jasperf

@jasperf jasperf commented May 23, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces a comprehensive setup for the "Banner Iframe Plugin," including CI workflows, development tools, WordPress.org deployment scripts, and improved code quality and testing. Below are the most important changes grouped by theme:

CI and Development Environment Setup

  • Added a GitHub Actions workflow in .github/workflows/ci.yml for running tests across multiple PHP and WordPress versions, including steps for setting up dependencies and running PHPCS and PHPUnit.
  • Introduced composer.json for dependency management, including development tools like PHPCS, PHPUnit, and WordPress Coding Standards. Added custom scripts for code quality checks and testing.
  • Added phpcs.xml.dist to define WordPress coding standards for the project.
  • Added phpunit.xml and a PHPUnit bootstrap file (tests/bootstrap.php) to enable unit testing for the plugin. [1] [2]

WordPress.org Plugin Preparation

  • Added a deploy.php script to automate preparing the plugin for deployment to the WordPress.org Plugin Directory.
  • Created assets/README.md to document required and optional assets for the WordPress.org plugin page.
  • Added readme.txt for the WordPress.org plugin repository, including plugin metadata, installation instructions, and changelog.

Code Quality and Refactoring

  • Refactored code in includes/class-banner-iframe-settings.php and includes/class-banner-iframe.php to improve readability and adhere to coding standards. [1] [2] [3]

Testing

  • Added a sample PHPUnit test case in tests/test-banner-iframe.php to verify the plugin's initialization.

Additional Enhancements

  • Added package.json to manage JavaScript dependencies and scripts for linting and testing.
  • Updated the README.md file to include development setup instructions and tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant