Skip to content

fix: resolve Plugin Check errors and warnings - #642

Merged
imantsk merged 6 commits into
release/v4.1.2/corefrom
fix/plugin-check-findings/core
Nov 27, 2026
Merged

imantsk merged 6 commits into
release/v4.1.2/corefrom
fix/plugin-check-findings/core

Conversation

@imantsk

@imantsk imantsk commented Nov 27, 2026

Copy link
Copy Markdown
Member

Changes

  • php/Utils/requests.php is loaded from Plugin::load_utilities() instead of Composer's files autoload, so the PHPUnit and PHPCS binaries no longer include it before WordPress loads.
  • defined( 'ABSPATH' ) || exit; added to the procedural files Plugin Check reported; deactivation-notice.php checks ABSPATH on its own line.
  • src/composer.json is included in the plugin package.
  • The two eval() calls that run snippet code carry a phpcs:ignore with the reason.
  • File-scope variables in uninstall.php and Core/load.php are prefixed; third-party hook and constant names are marked.
  • Direct queries on the plugin's own tables (and the import source tables) carry phpcs annotations with the reason; every value in them was already prepared, and table names cannot use %i while WordPress 5.5 is supported.

Verification

  • Plugin Check 2.2.0 (WP-CLI, WordPress 7.1.5) against the package built with npm run bundle: 0 errors, 0 warnings (before: 2 errors, 64 warnings after the ABSPATH change; 11 errors, 65 warnings on 4.1.1).
  • PHPUnit still runs the full suite (529 tests) and npm run lint:php still lints after the autoload change.

@imantsk imantsk added the run-tests Trigger automated tests label Nov 27, 2026
@imantsk
imantsk merged commit 5139897 into release/v4.1.2/core Nov 27, 2026
41 of 47 checks passed
@imantsk
imantsk deleted the fix/plugin-check-findings/core branch November 27, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests Trigger automated tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant