fix: address WordPress.org plugin review round 1 (v2.2.3)#38
Merged
Conversation
- Load all CSS/JS via WordPress dependency APIs: challenge/block interstitials now use wp_register_style/script + wp_print_styles/scripts with static assets (public/css/, public/js/webdecoy-challenge.js); Statistics chart data attaches via wp_add_inline_script - Make the 'Protected by WebDecoy' challenge-page credit an explicit admin opt-in (Settings > Blocking), off by default (guideline 10) - Update bundled Chart.js 4.4.9 -> 4.5.1 (latest stable) - Remove load_plugin_textdomain() (unneeded since WP 4.6; min is 6.1) - readme: Contributors -> webdecoy1 (wp.org account), note that good-bot documentation URLs are reference metadata and never requested - Bump version to 2.2.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes every actionable item from the WordPress.org plugin review (Review ID: AUTOPREREVIEW webdecoy/webdecoy1/21Jul26).
Flagged items and fixes
1. Use wp_enqueue commands (challenge-page.php:28/195, block-page.php:35, statistics-page.php:248)
exitafter include), sowp_enqueue_scriptsnever fires there. They now use the WordPress dependency APIs directly:wp_register_style+wp_print_styles([handle])in head andwp_register_script+wp_add_inline_script(per-request config/i18n) +wp_print_scripts([handle])before</body>, with the CSS/JS extracted to static files:public/css/webdecoy-challenge.css,public/css/webdecoy-block.csspublic/js/webdecoy-challenge.js(readswebdecoyChallengeConfigglobal)webdecoy-chartshandle viawp_add_inline_script(..., 'before')— no raw<script>tag.2. Powered by / credit links (guideline 10)
challenge_show_creditoption (default false) with sanitizer.3. Contributors list
Contributors: webdecoy→webdecoy1(the wp.org account that owns the submission).4. Out-of-date Chart.js
admin/js/vendor/chart.umd.min.jsupdated 4.4.9 → 4.5.1 (latest stable, from the official npm tarball). Enqueue version string and readme reference updated.5. External services / GoodBotList URLs
6. load_plugin_textdomain()
7. Nonces & permissions
$_GET/$_POST/$_REQUESTsite: all state-changing paths already havecheck_ajax_referer/wp_verify_nonce+current_user_can(2.2.2 hardening). No changes needed.Verification
php -lclean on all changed files./build.sh 2.2.3 --orgbuilds clean; zip contains the new assets, excludes self-updater/clearance client