Fixed: speed module would cause fatal errors in wp-admin on multisite networks.#306
Conversation
📝 WalkthroughWalkthroughPlugin version bumped to 1.0.2. The ChangesProxy Request Detection Hardening
Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@mu-plugin/plausible-proxy-speed-module.php`:
- Around line 71-80: The current guard and docblock overstate rest_url()'s
dependency on $wp_rewrite and can cause false negatives; update the comment to
note that $wp_rewrite is only needed in specific multisite/permalink cases (via
get_rest_url()/rest_url()), and change the early-return to only bail when
$wp_rewrite is null AND one of those conditions applies (e.g., is_multisite() or
a non-empty get_option('permalink_structure')); reference get_rest_url(),
rest_url(), and the global $wp_rewrite in the updated comment and change the if
to: if ( $wp_rewrite === null && ( is_multisite() ||
get_option('permalink_structure') ) ) return false;
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 52a8a81a-dc9a-4c97-989f-92c1fad1b3f8
📒 Files selected for processing (1)
mu-plugin/plausible-proxy-speed-module.php
Summary by CodeRabbit