wp-cli/checksum-command
Verifies WordPress file integrity by comparing installed files against WordPress.org's published checksums. Use wp core verify-checksums to detect tampered or missing core files, with options for version, locale, exclusions, and output formats.
Framing correction (important for scoping): wp-cli/checksum-command is not a Laravel package and not a general-purpose PHP library. It is a WP-CLI command package — a set of Symfony-Console-style commands that register against the WP-CLI runtime (wp core verify-checksums, wp plugin verify-checksums). It is bundled inside WP-CLI itself and has 0 Composer dependents, so it is consumed as a CLI tool / operational capability, not as an in-process dependency. Any Laravel-side "leverage" is therefore an orchestration story (invoke the binary, parse structured output), not a composer require story.
Architecture fit
--format=json|csv|yaml|count payloads.Integration feasibility — high, with caveats
wp package install only to override the bundled version).--format=json) makes it machine-consumable, which is the single most valuable property for a TPM: it converts a human-facing check into a pipeline assertion.Error:/Warning: text; --insecure retry exists as a tempting escape hatch; MD5-based comparison means integrity vs. published manifest, not cryptographic authenticity.Technical risk
--insecure as a policy violation in prod.api.wordpress.org / downloads.wordpress.org. Availability, latency, and rate-limiting become your CI reliability. No offline/vendored manifest mode documented.--version, --locale), custom files in root (--include-root surfaces them), readme.txt soft changes (--strict flips behaviour), plugins not hosted on WordPress.org (no checksums → cannot verify), and mu-plugins (--exclude-mu-plugins) all produce noise that erodes trust in the gate.--include-root/--version, v3.0.1 parallel checksum downloads) can make the same command behave differently across hosts.Key questions
--exclude)?--version/--locale pair per site?opportunity: 61.43 vs. overall score: 30.4, is the intent to adopt the command or to build a wrapper product on top of it? The gap reads as "high unmet need, low current mindshare" — a signal to wrap, not fork.Stack fit
php artisan wp:verify-checksums) that shells out via Symfony\Component\Process\Process, captures --format=json, and persists results to an integrity_checks table (site, version, locale, checked_at, mismatches JSON, exit_code).composer.json of the Laravel app. If you must install it explicitly, install it in the WP-CLI context (wp package install wp-cli/checksum-command) or bake it into the ops image.Migration path
wp core verify-checksums --format=json and wp plugin verify-checksums --all --format=json in report-only mode for 2–4 weeks; catalogue every mismatch class (custom root files, locale mismatch, soft changes, unverifiable plugins) and build the --exclude allowlist from evidence.--exclude list and --exclude-mu-plugins where mu-plugins are vendored; wire --version/--locale from the site's actual metadata rather than defaults.Compatibility
--insecure prohibition via lint/review — no config flag should enable it on production paths.--strict semantics for plugin checks: default tolerates readme.txt-class "soft changes." Decide explicitly per environment; strict in CI, lenient in monitoring, or vice versa — but document it.core defaults to plain, plugin defaults to table); always pass --format=json explicitly and version your parser against the payload shape ({"file": ..., "message": ...} for core).Sequencing (recommended)
Maintenance
--exclude whitespace trimming, and plugins without main PHP files).--include-root, v3.x parallelization) and re-baseline after each WP-CLI bump.Support
Scaling
Failure modes (ranked by likelihood × impact)
| Mode | Symptom | Mitigation |
|---|---|---|
| False positive from locale/version mismatch | File doesn't verify: wp-includes/version.php, readme.html |
Derive --version/--locale from site metadata; allowlist |
| Custom/premium files flagged | Mismatches in root or plugins with no wporg manifest | --include-root off; --exclude; classify unverifiable plugins separately |
| Upstream API outage / TLS failure | Command errors or hangs | Timeout + retry; never default to --insecure; fail open to report-only |
| Soft changes triggering failures | readme.txt, wp-config-sample.php noise |
Explicit --strict policy per environment |
| Silent pass on compromised-but-matching files | Integrity is manifest-relative | Pair with file-permission/process auditing; not a substitute for endpoint security |
| Output/exit-code drift after upgrade | Parser breaks or gate silently passes | Schema assertions in the wrapper; treat unparseable output as failure |
| Version skew across fleet | Same command, different results | Pin WP-CLI image; assert version at runtime |
Ramp-up
--strict applies, and how a red gate blocks a release. Budget a policy doc plus an allowlist review cadence (quarterly).--version, --locale, --format=json), and the one forbidden flag (--insecure).How can I help you explore Laravel packages today?