Skip to content

Suppress verified false-positive PHPCS/Plugin Check warnings, remove redundant textdomain load#670

Open
miyanialkesh7 wants to merge 2 commits into
lloc:masterfrom
miyanialkesh7:plugin-check-cleanup
Open

Suppress verified false-positive PHPCS/Plugin Check warnings, remove redundant textdomain load#670
miyanialkesh7 wants to merge 2 commits into
lloc:masterfrom
miyanialkesh7:plugin-check-cleanup

Conversation

@miyanialkesh7

Copy link
Copy Markdown

Summary

  • Removes the load_plugin_textdomain() call flagged by the WordPress.org Plugin Check tool; WordPress.org already auto-loads this plugin's bundled translations by matching the text domain to the plugin slug, so the manual call (and the init action registering it) is unnecessary.
  • Adds the missing @var/@param docblock tags on Plugin.php flagged by PHPCS.
  • Adds justified phpcs:ignore comments for two categories of warnings verified as false positives / accepted risk during Plugin Check review, so CI comes back clean instead of carrying unexplained warnings:
    • WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound — PHPCS can't statically resolve a self::CONST value, but every constant used is already prefixed with msls_.
    • WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in — admin-only or capability-checked, paginated queries where the excluded-ID set comes from TranslatedPostIdQuery, not attacker-controlled input.

Context

Split out of #668 to keep scope focused, per maintainer feedback. No behavior change beyond removing the redundant textdomain load; the rest is docblocks and static-analysis suppressions.

Test plan

  • Confirm plugin translations still load correctly on WordPress.org-hosted sites after removing load_plugin_textdomain()
  • Run PHPCS / Plugin Check locally and confirm the previously-flagged warnings are gone

…k tags

WordPress.org already auto-loads this plugin's bundled translations by
matching the text domain to the plugin slug, so the manual
load_plugin_textdomain() call flagged by the WordPress.org Plugin
Check tool is unnecessary. Also add the @var/@param docblock tags on
Plugin.php flagged by PHPCS.
Add justified phpcs:ignore comments for two categories of warnings
verified as false positives or accepted risk during the Plugin Check
review, so CI comes back clean instead of carrying unexplained
warnings:

- WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound
  (call sites): PHPCS cannot statically resolve a self::CONST value,
  but every constant used is already prefixed with "msls_".
- WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in
  (call sites): admin-only or capability-checked, paginated queries
  where the excluded-ID set comes from TranslatedPostIdQuery, not
  attacker-controlled input.
@miyanialkesh7
miyanialkesh7 requested a review from lloc as a code owner July 23, 2026 14:33
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

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