Skip to content

Fix Plugin Check issues across the codebase#2912

Draft
donnchawp wants to merge 1 commit intotrunkfrom
fix/plugin-check-issues
Draft

Fix Plugin Check issues across the codebase#2912
donnchawp wants to merge 1 commit intotrunkfrom
fix/plugin-check-issues

Conversation

@donnchawp
Copy link
Contributor

@donnchawp donnchawp commented Feb 24, 2026

Summary

Addresses ~40 actionable items from the WordPress Plugin Check report across 43 files.

Naming convention warnings and other false positives were intentionally skipped — see below.

Changes

  • ABSPATH guards — added to 15 files missing them
  • readme.txt — fixed Requires PHP (7.4), License (GPL-2.0-or-later), Tested up to (6.9) to match plugin header
  • Deprecated functions — removed wp_no_robots() fallback (WP 5.7+), fixed wp_count_terms() to use array-only signature (WP 5.6+)
  • Ordered placeholders — converted %s to %1$s/%2$s in 4 email/submission templates
  • Translators comments — added missing // translators: comments for strings with placeholders
  • Escaping — replaced _e() with esc_html_e() in 4 templates; wrapped UI helper outputs with wp_kses_post(); added esc_html() around size_format() and $search_input
  • Heredoc removal — converted <<<HTML/<<<CSS blocks to string concatenation in 4 files
  • Removed load_plugin_textdomain() — WordPress auto-loads translations for .org-hosted plugins since WP 4.6
  • Bundled jQuery UI CSS — replaced external CDN URL (code.jquery.com) with local copy
  • Renamed chosen-sprite@2x.pngchosen-sprite-2x.png and updated CSS reference

Intentionally skipped

  • All NonPrefixedHookname / NonPrefixedVariable / NonPrefixedFunction warnings — established public API, would be a breaking change
  • trademarked_term — can't rename the plugin
  • plugin_updater_detected in helper class — intentional for add-on license management
  • ExceptionNotEscaped — exception messages aren't output to HTML
  • paginate_links() output — WordPress core returns safe HTML
  • $job_submitted_content — already sanitized with wp_kses_post()

Test plan

  • Verify PHP syntax: find . -name '*.php' -exec php -l {} \;
  • Re-run Plugin Check and confirm error count decreases
  • Smoke-test job submission flow and email templates (placeholder ordering)
  • Verify datepicker styling loads correctly (jQuery UI CSS)
  • Verify chosen dropdown retina sprites display correctly
  • Check job dashboard renders correctly (escaping changes, actions menu, notice dialogs)

Plugin build for 0d1b55c
📦 Download plugin zip
▶️ Open in playground

Address ~40 actionable items from the WordPress Plugin Check report:

- Add ABSPATH guards to 15 files missing them
- Fix readme.txt header mismatches (PHP 7.4, GPL-2.0-or-later, WP 6.9)
- Remove deprecated wp_no_robots() fallback and fix wp_count_terms() signature
- Convert unordered sprintf placeholders to ordered (%1$s, %2$s) in templates
- Add missing translators comments for i18n strings with placeholders
- Replace _e() with esc_html_e() in template files
- Convert heredoc syntax to string concatenation (4 files)
- Add proper escaping (wp_kses_post, esc_html) to template outputs
- Remove load_plugin_textdomain() (WP auto-loads for .org plugins since 4.6)
- Bundle jQuery UI CSS locally instead of loading from CDN
- Rename chosen-sprite@2x.png to chosen-sprite-2x.png
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