A new version of Plugin Check Plugin has been released.
Version 1.3.0 brings enhancements, including new checks for plugin headers, readme file validation, and stricter code quality measures such as restricting parse_str and disallowing HEREDOC and NOWDOC. It adds support for the MPL-2.0 license, improves handling of localhost URLs, and encourages best practices like using native functions for images and avoiding query_posts(). The update also refines license checks, allows custom paths for checks, and includes CLI improvements for low-severity errors and runtime setup. Additionally, various fixes address validation issues, runtime check execution, and file path handling, ensuring better compatibility and adherence to WordPress standards.
In detail, you can see all changes below.
Enhancements
- Plugin Header Checks
- Added validation for missing plugin description and version.
- Introduced checks for invalid plugin version.
- Readme File Validation
- New validation for the donate link in the readme file.
- Updated checks for contributors in Markdown readme files.
- Differentiates between a missing readme file and a default one.
- Code and Functionality Checks
- Restricted
parse_str()
usage without a second argument. - Disallowed usage of
HEREDOC
andNOWDOC
. - Added checks to prevent inclusion of libraries already in WordPress core.
- Added warnings for using
query_posts()
in favor ofWP_Query
. - Encouraged native functions for loading images in templates.
- Restricted
- License Checks
- Created a dedicated class for license checks.
- Added support for the MPL-2.0 license.
- Updated error type for license check codes.
- Trademark and Domain Checks
- Updated disallowed domains for the Plugin URI field.
- Allowed specific acronyms in trademark checks.
- Runtime and CLI Enhancements
- Added an option in the CLI to include low-severity errors and warnings.
- Fixed runtime environment setup order in the CLI.
- Allowed custom checks to provide installed paths.
- Severity Updates
- Increased severity for:
- Incorrect
Plugin Requires
values. - Code obfuscation.
- Incorrect
- Increased severity for:
- Miscellaneous
- Improved handling of localhost URLs.
- Updated table prefix usage for runtime check requests.
- Implemented a Gherkin linter in GitHub actions.
- Documented plugin checks for better clarity.
Fixes
- Runtime and Addon Checks
- Fixed issues with local environment setup before testing.
- Ensured addon checks execute correctly during runtime checks.
- Validation Fixes
- Allowed
default
as a text domain in text domain checks. - Accepted GitHub URLs in the Plugin URI field.
- Corrected a false flag for the Apache license in the WordPress.org plugin repository.
- Allowed
- File Path Issues
- Resolved problems caused by poorly named files by removing the path before the plugin.
This release focuses on enhancing code quality, improving validation, and providing better developer tools and documentation.
More info in Plugin Check Plugin WordPress Page and GitHub Page release.
Leave a Reply