You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+27-62Lines changed: 27 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
27
27
6. Admin-only context → Needs Review
28
28
7. True N+1 with multi-object iteration → Confirmed
29
29
30
-
-**WordPress cache-primed hooks dictionary** – Added `WP_CACHE_PRIMED_HOOKS` mapping WordPress hooks (e.g., `show_user_profile`, `edit_user_profile`, `add_meta_boxes`) to their object types, enabling automatic detection of contexts where meta is pre-cached.
30
+
-**WordPress cache-primed hooks dictionary** – Added `WP_CACHE_PRIMED_HOOKS` mapping WordPress hooks (e.g., `show_user_profile`, `edit_user_profile`, `add_meta_boxes`) to their object types, enabling automatic detection of contexts where meta is pre-cached. The dictionary is located in `dist/bin/ai-triage.py`. Developers can update it by adding new hooks and testing changes to ensure no regressions.
-**`is_wp_cache_primed_view()` helper function** – New function that detects WordPress admin views where meta cache is pre-primed based on file path patterns. Matches files like `view-wwlc-custom-fields-on-user-admin.php` and downgrades severity to INFO since WordPress primes user meta cache on `user-edit.php` before hooks fire.
@@ -1500,6 +1500,7 @@ Reason: WordPress primes user meta cache on user-edit.php before hooks fire
1500
1500
- **Pattern Library:** Now 28 total patterns (was 27)
1501
1501
- **Impact:** Helps identify and fix severe thank-you page performance issues on WooCommerce sites
1502
1502
- **Test Status:** ✅ Tested against Binoid site - successfully detected Smart Coupons with `wc_get_coupon_id_by_code()` calls
1503
+
1503
1504
- **Main Scanner Integration** - Both coupon patterns now integrated into `check-performance.sh`
1504
1505
- **`wc-coupon-in-thankyou`** - Integrated at line 4627-4695 (after WooCommerce N+1 check)
1505
1506
- **`wc-smart-coupons-thankyou-perf`** - Integrated at line 4699-4778 (after coupon-in-thankyou check)
@@ -2152,58 +2153,6 @@ Reason: WordPress primes user meta cache on user-edit.php before hooks fire
2152
2153
2153
2154
## [1.0.76] - 2026-01-02
2154
2155
2155
-
### Changed
2156
-
- Increased default fixture validation coverage to run eight proof-of-detection checks, covering AJAX, REST routes, admin capability callbacks, and direct database access patterns.
2157
-
2158
-
### Added
2159
-
- Made fixture validation count configurable via `FIXTURE_COUNT` template option or the `FIXTURE_VALIDATION_COUNT` environment variable (default: 8).
- **Workflow Guide:** Includes step-by-step instructions in `_notes` section
2639
+
2640
+
- **Configuration Documentation** - Created `/dist/config/README.md` with comprehensive usage guide
2641
+
- **Quick Start:** Copy, edit, and use custom config files
2642
+
- **Comment Field Reference:** Table of common underscore field names and their purposes
2643
+
- **Field Reference:** Which fields are editable vs. read-only
2644
+
- **Best Practices:** DOs and DON'Ts for config customization
2645
+
- **Example Workflow:** Complete workflow from copy to CI/CD integration
2681
2646
2682
2647
## [1.0.60] - 2025-12-31
2683
2648
@@ -2690,7 +2655,7 @@ Tested against real WordPress plugin:
2690
2655
- **Location:**`dist/config/severity-levels.json`
2691
2656
- **Usage (Day 2):** Users will copy this file, edit `level` fields, and pass `--severity-config <path>` to customize severity rankings
2692
2657
- **Factory Defaults:** Each check includes `factory_default` field for reference (users can always see original values)
2693
-
- **Self-Documenting:** Includes instructions, version, last_updated, and total_checks in metadata
2658
+
- **Self-Documented:** Includes instructions, version, last_updated, and total_checks in metadata
2694
2659
- **Comment Field Support:** Any field starting with underscore (`_comment`, `_note`, `_reason`, `_ticket`, etc.) is ignored by parser
2695
2660
- **Purpose:** Users can document why they changed severity levels
2696
2661
- **Examples:**`_comment: "Upgraded per security audit"`, `_ticket: "JIRA-1234"`, `_date: "2025-12-31"`
@@ -2887,7 +2852,7 @@ Tested against real WordPress plugin:
2887
2852
- Disabled `example-caller.yml` triggers (changed to `workflow_dispatch` only)
2888
2853
- This template file was causing duplicate CI runs
2889
2854
- Now only runs manually, preventing automatic triggers
2890
-
- Added clear warnings that it's a template/example file
2855
+
- Added clear warnings that it's a template file
2891
2856
- Created `.github/workflows/README.md` documenting:
2892
2857
- Why we use a single workflow
2893
2858
- How to modify CI behavior without creating new files
@@ -3312,7 +3277,7 @@ Tested against real WordPress plugin:
3312
3277
- Updated `PROJECT/PROJECT.md`"Current State", "Proposed Approach", and "Three-layer system" sections so they reflect the currently implemented toolkit pieces (grep-based CLI, fixture suite, CI wiring, and the Neochrome WP Toolkit demo plugin) and reference GPT 5.1 feedback via `BACKLOG.md` instead of an inline TEMP dump.
3313
3278
3314
3279
- **Version metadata**
3315
-
- Bumped the CLI script and backlog version markers to 1.0.43 to keep JSON output, terminal banners, and documentation in sync with this changelog.
3280
+
- Bumped the CLI script and backlog version markers to 1.0.43 to keep JSON output, log headers, and terminal banners stay in sync with the changelog.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,6 +124,31 @@ Every new check **must** have test fixtures:
124
124
-**Functions**: One responsibility per function
125
125
-**Variables**: Use descriptive names (`FINDING_COUNT` not `fc`)
126
126
127
+
### Updating the Cache-Primed Hooks Dictionary
128
+
129
+
The **cache-primed hooks dictionary** (`WP_CACHE_PRIMED_HOOKS`) is located in `dist/bin/ai-triage.py`. This dictionary maps WordPress hooks to object types and is critical for reducing false positives in N+1 detection.
130
+
131
+
#### Steps to Update:
132
+
1.**Identify New Hooks**:
133
+
- Look for WordPress hooks that pre-cache metadata for objects (e.g., `user`, `post`, `comment`).
134
+
2.**Add to the Dictionary**:
135
+
- Open `dist/bin/ai-triage.py` and add the new hook to the `WP_CACHE_PRIMED_HOOKS` dictionary.
136
+
3.**Test Your Changes**:
137
+
- Run the test suite to ensure no regressions.
138
+
- Add new test cases if necessary.
139
+
4.**Submit a Pull Request**:
140
+
- Include a clear description of the added hooks and their purpose.
0 commit comments