Skip to content

Download plugin checksums in parallel - #162

Merged
swissspidy merged 1 commit into
mainfrom
claude/plugin-checksums-parallel
Oct 6, 2026
Merged

swissspidy merged 1 commit into
mainfrom
claude/plugin-checksums-parallel

Conversation

@swissspidy

@swissspidy swissspidy commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

wp plugin verify-checksums downloaded the checksums of one plugin at a time, between hashing the files of the previous one. On a site with many plugins, most of the time went into waiting for these requests.

This downloads the checksum files for all plugins up front, ten at a time, before verifying any files:

  • Fallback: anything that isn't downloaded this way (a failed request, an unexpected response) is downloaded again one at a time through the existing code path. Retries, warnings and errors are unchanged.
  • No caching: plugin checksums can change for the same version, so nothing is cached between runs.

Results

wp plugin verify-checksums --all Before After
37 plugins 10.2 s 6.0 s

The output is identical to main, including for plugins without checksums.

Tests

  • New scenario in features/checksum-plugin.feature: verifies two wordpress.org plugins (one with a modified file) and a custom plugin without checksums in one run. It checks that two checksum files were downloaded in parallel, and that the mismatch, the skip warning and the final error are the same as before.
  • Feature suite: features/checksum-plugin.feature passes locally.
  • Static checks: PHPCS and PHPStan are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01D26yjkN2BiqCXT6p6o1WqS

Summary by CodeRabbit

  • New Features
    • Checksum verification can now retrieve checksums for multiple eligible plugins in one command, reducing separate downloads.
    • The command continues to report checksum mismatches and skip plugins without an available checksum, with a summary of verified, failed, and skipped plugins.

`wp plugin verify-checksums` downloaded the checksums of one plugin at a
time, between hashing the files of the previous one. On a site with
many plugins, most of the time went into waiting for these requests.

Download them for all plugins up front, ten at a time, before verifying
any files. Anything that isn't downloaded this way, for example because
a request failed, is downloaded again one at a time as before, so error
handling and retries don't change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D26yjkN2BiqCXT6p6o1WqS
Copilot AI balanced review requested due to automatic review settings October 6, 2026 16:28
@swissspidy
swissspidy requested a review from a team as a code owner October 6, 2026 16:28

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bdd7aef3-62e3-4933-82d0-05b84f5fa312
📥 Commits

Reviewing files that changed from the base of the PR and between 357d229 and 420621f.

📒 Files selected for processing (2)
  • features/checksum-plugin.feature
  • src/Checksum_Plugin_Command.php

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The command resolves eligible plugin versions before verification and fetches checksums in parallel batches of up to 10. It uses individual requests when prefetched results are unavailable. A feature scenario checks checksum results for three plugins.

Changes

Plugin checksum batching

Layer / File(s) Summary
Parallel checksum prefetching
src/Checksum_Plugin_Command.php
The command uses RequestsLibrary to fetch checksum data in parallel batches of up to 10 requests.
Verification and fallback
src/Checksum_Plugin_Command.php, features/checksum-plugin.feature
The command resolves eligible plugin versions before verification and uses prefetched checksum maps when available. It retains individual retrieval otherwise. The feature scenario checks a modified plugin, parallel downloads, a skipped checksum, and the final verification counts.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant Checksum_Plugin_Command
  participant RequestsLibrary
  participant WordPress_org_checksum_endpoint
  Checksum_Plugin_Command->>RequestsLibrary: Submit eligible checksum requests in chunks
  RequestsLibrary->>WordPress_org_checksum_endpoint: Fetch checksum data
  WordPress_org_checksum_endpoint-->>RequestsLibrary: Return HTTP responses
  RequestsLibrary-->>Checksum_Plugin_Command: Return prefetched checksum results
  Checksum_Plugin_Command->>WordPress_org_checksum_endpoint: Request checksum individually when no prefetched result is available
Loading

Suggested reviewers: schlessera

Merge Risk: ⚪ Minimal · up to 42062

No actionable issue was established that would prevent merging after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (1 skipped: 1 …
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: downloading plugin checksums in parallel.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 github-actions Bot added automated-pr command:plugin-verify-checksums Related to 'plugin verify-checksums' command scope:testing Related to testing labels Oct 6, 2026
@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.74468% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Checksum_Plugin_Command.php 95.74% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy added this to the 3.0.1 milestone Oct 6, 2026
@swissspidy
swissspidy merged commit a70aa79 into main Oct 6, 2026
57 checks passed
@swissspidy
swissspidy deleted the claude/plugin-checksums-parallel branch October 6, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-pr command:plugin-verify-checksums Related to 'plugin verify-checksums' command scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants