Skip to content

perf: avoid public credential decryptions - #1653

Merged
superdav42 merged 2 commits into
mainfrom
feature/auto-20260719-111538
Jul 19, 2026
Merged

perf: avoid public credential decryptions#1653
superdav42 merged 2 commits into
mainfrom
feature/auto-20260719-111538

Conversation

@superdav42

@superdav42 superdav42 commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Avoid decrypting stored hosting credentials when evaluating integration setup.
  • Restrict integration notices to network-admin requests.
  • Cover setup checks with an invalid encrypted credential payload.

Verification

  • PHP syntax checks passed for the two source files and regression test.
  • Git whitespace validation passed.
  • Focused PHPUnit and PHPCS could not run because this linked worktree has no vendor directory.

aidevops.sh v3.32.156 plugin for OpenCode v1.18.3

Summary by CodeRabbit

  • Bug Fixes
    • Improved integration setup detection for configured credentials, including encrypted values.
    • Limited integration admin notices to the WordPress network admin area.
  • Tests
    • Added coverage verifying integrations are recognized as configured without decrypting stored credentials.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@superdav42, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d60db058-9d3a-48dc-9808-0701b44f9678

📥 Commits

Reviewing files that changed from the base of the PR and between 927f545 and 4a26052.

📒 Files selected for processing (1)
  • inc/integrations/class-integration-registry.php
📝 Walkthrough

Walkthrough

The integration credential checks now detect configured constants and stored encrypted network options without decrypting values. A test covers this behavior, and admin notice registration now returns early outside the WordPress network admin area.

Changes

Credential presence validation

Layer / File(s) Summary
Stored credential presence checks
inc/integrations/class-integration.php, tests/WP_Ultimo/Integrations/Integration_Test.php
Adds has_credential() and uses it in setup and missing-constant checks; the integration test verifies encrypted-looking stored credentials are accepted without decryption.

Network admin notice scope

Layer / File(s) Summary
Network admin request guard
inc/integrations/class-integration-registry.php
register_admin_notices() now exits when the current request is outside the WordPress network admin area.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: it highlights avoiding credential decryption for a performance improvement.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/auto-20260719-111538

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@inc/integrations/class-integration-registry.php`:
- Line 399: Update the loaded-state comparison in the condition surrounding
\WP_Ultimo()->is_loaded() to use the Yoda form false ===
\WP_Ultimo()->is_loaded(), while preserving the existing ! is_network_admin()
guard and overall logic.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2d6972d8-6e97-4a0f-9adf-67d58d5440f7

📥 Commits

Reviewing files that changed from the base of the PR and between b366d9d and 927f545.

📒 Files selected for processing (3)
  • inc/integrations/class-integration-registry.php
  • inc/integrations/class-integration.php
  • tests/WP_Ultimo/Integrations/Integration_Test.php

Comment thread inc/integrations/class-integration-registry.php Outdated
@github-actions

Copy link
Copy Markdown

Performance Test Results

Performance test results for 9385eed are in 🛎️!

@superdav42 superdav42 added the status:in-review PR open, awaiting review/merge label Jul 19, 2026
@superdav42 superdav42 self-assigned this Jul 19, 2026
@superdav42

Copy link
Copy Markdown
Collaborator Author

Interactive session claimed by @superdav42 in ultimate-multisite-bugfix-gh1653-address-verified-pr-1653-review-thread-b on thinkserver.
Pulse dispatch blocked via status:in-review + self-assignment.


aidevops.sh v3.32.156 plugin for OpenCode v1.18.3 with gpt-5.6-terra spent 47s and 32,344 tokens on this with the user in an interactive session.

@github-actions

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@superdav42
superdav42 merged commit 450f11c into main Jul 19, 2026
11 checks passed
@superdav42

Copy link
Copy Markdown
Collaborator Author

Summary

  • Avoid decrypting stored hosting credentials when evaluating integration setup.
  • Restrict integration notices to network-admin requests.
  • Cover setup checks with an invalid encrypted credential payload.

Verification

  • PHP syntax checks passed for the two source files and regression test.
  • Git whitespace validation passed.
  • Focused PHPUnit and PHPCS could not run because this linked worktree has no vendor directory.

aidevops.sh v3.32.156 plugin for OpenCode v1.18.3


Merged via PR #1653 to main.
Merged by deterministic merge pass (pulse-wrapper.sh).

@superdav42 superdav42 added the review-feedback-scanned Merged PR already scanned for quality feedback label Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-feedback-scanned Merged PR already scanned for quality feedback status:in-review PR open, awaiting review/merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant