Conversation
…tainment - spo-004: Add admin-only hook whitelist to downgrade inherently-admin hooks (admin_notices, admin_init, admin_menu, etc.) to INFO severity instead of flagging as missing capability checks - N+1: Replace line-range heuristic in find_meta_in_loop_line() with brace-depth tracking so get_*_meta calls after a loop's closing brace are no longer false-positived as N+1 patterns - Update FEEDBACK-CR-SELF-SERVICE.md, CHANGELOG.md, and 4X4.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The grouping function's flush uses the caller's severity args, which overwrote the INFO downgrade back to HIGH. Use add_json_finding directly for whitelisted hooks to preserve the INFO severity. Verified: credit-registry-forms.php:48 now correctly reports as INFO. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e dedup - limit-multiplier-from-count: tighten JSON search_pattern to require count(...) * <number> instead of matching any count() call (24 → 0 FPs) - rest-no-pagination: add skip_if_context_matches to scripted runner and suppress non-GET endpoints (POST/PUT/DELETE/PATCH) via 3-line narrow context check (16 → 8 findings) - Cross-rule dedup: deduplicate overlapping superglobal findings (spo-002, unsanitized-read, isset-bypass) in JSON report builder — same file:line keeps only the first finding (23 duplicates eliminated) Total CR self-service findings: 99 → 31 after all rounds of fixes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- New "WP Code Check Scanner — Quick Reference" section with CLI flags, output locations, MCP server config, and pattern library pointer - Updated version tag to v2.2.9 - Include user-created CLAUDE.md that points agents to AGENTS.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The N+1 check emitted findings with an empty code field because find_meta_in_loop_line only returned the line number. Now extracts the actual source line via sed before passing to add_json_finding. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…hook - n-plus-one-optimized.php: sequential meta calls after loop closure - limit-multiplier-from-count.php: display/comparison/assignment count() uses - admin-no-capability.php: admin-only hook whitelist (admin_notices, admin_init, admin_menu) All 20 fixture validations pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Description
Type of Change
Related Issue
Fixes #(issue number)
Changes Made
Testing
dist/tests/run-fixture-tests.sh- All tests passdist/tests/fixtures/clean-code.phpChecklist
CLA Signature
For first-time contributors: Please comment below with:
This is a one-time requirement. Once signed, you can contribute to all future PRs without re-signing.
Questions about the CLA? See CLA.md or email cla@hypercart.com
Additional Notes