Conversation
QA suite — refused, no regression specThis PR changes product source but adds no spec, so the suite was Source files changed with no matching spec |
|
Built theme zip for this branch ( radiate-fix-unbounded-get-users-notice-cleanup.zip (built via Upload it via Appearance > Themes > Add New > Upload Theme on a test site. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
This PR optimizes theme-switch cleanup by targeting users with relevant notice metadata instead of loading all users.
Changes:
- Uses an
ORmeta query for the two notice flags. - Retrieves user IDs only and removes both flags.
| File | Description |
|---|---|
inc/admin/class-radiate-theme-review-notice.php |
Optimizes review-notice metadata cleanup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Related to themegrill/radiate-pro#34 (same root cause, both editions)
Changes proposed in this Pull Request:
Same pattern as Radiate Pro:
review_notice_data_remove()ranget_users()with no arguments on every theme switch, loading every site user just to check and delete two per-user meta flags for each. Fixed by querying only user IDs that actually have one of the two meta keys set, viameta_querywithrelation => OR, and operating on IDs instead of full user objects.Verified live: created test users, set one of the two notice-dismissal meta keys on each, triggered a genuine admin theme-switch (Appearance > Themes > Activate), and confirmed both users' meta were correctly cleaned up.
Types of changes:
Other information:
PHPCS: clean, aside from one expected
WordPress.DB.SlowDBQuery.slow_db_query_meta_querywarning -- the standard, recommended pattern for a targeted usermeta lookup, replacing the far more expensive unconditional full-table load.Changelog entry
Fix - Theme-switch cleanup no longer loads every site user just to clear notice flags.