v0.1.0 — Analyzer preview
Sediment v0.1.0 — Analyzer preview
The first public preview: a complete static analyzer for a WordPress plugin's
database footprint, from detection through grading and teardown generation. It
reads source only — no WordPress runtime, no database — and runs on PHP 8.3+.
What it does
- Detection. Options (with the autoload flag), custom tables (
dbDeltaand
CREATE TABLEvia$wpdb->query, with$wpdb->prefixresolved to a
{prefix}token), cron events (with recurrence), and transients. - Static resolution. Keys built from
define()/const, class constants
(self::,Foo::),$this->properties, string concatenation, string
interpolation, and local variables — each carrying an honest confidence level
(verified,resolved,pattern,dynamic). It never presents a guess as a
fact, and reports the fraction of write calls it could resolve. - Cleanup diff. Parses
uninstall.phpandregister_uninstall_hook
callbacks with the same engine and marks every artifact cleaned or left behind. - Grading.
sediment gradereturns an A–F letter and a 0–100 score weighted
by real-world damage (an orphaned autoloaded option outweighs many small rows). - Generation.
sediment uninstallwrites aphp -l-valid teardown that
removes only the high-confidence, non-core artifacts a plugin leaves behind. - Safety. A WordPress core allowlist and a dedicated
core-protectionCI job
assert that core artifacts can never enter a deletable set.
Install
composer require --dev sediment/analyzer
# or from a clone
git clone https://github.com/SNO7E-G/Sediment.git && cd Sediment && composer install
php bin/sediment scan path/to/plugin
php bin/sediment grade path/to/plugin
php bin/sediment uninstall path/to/plugin > uninstall.phpFull details are in the changelog.