v0.1.1 — Correctness & safety hardening
Sediment v0.1.1 — Correctness & safety hardening
A focused pass after a full adversarial review of the analyzer. There are no new
commands; the analyzer is simply more conservative and more correct. Every change
errs toward under-claiming rather than guessing — a key is reported as owned,
cleaned, or safe to delete only when the source genuinely proves it.
Fixed
- Cross-namespace resolution. Names resolve to their fully-qualified form, so
two classes or functions that share a short name in different namespaces no
longer cross-resolve, and a same-named method in an unrelated class can no
longer credit an uninstall callback. - Local-variable binding. Variables bound by function parameters,
foreach,
global,static,catch, and destructuring now resolve todynamic; a
single literal assignment can no longer claim a variable whose value varies at
runtime and flow into a generated deletion. - Anonymous classes are keyed per file, closing a cross-file symbol leak.
- Table SQL is read with one anchored, statement-aware parser shared by
detection and cleanup:CREATE TABLEinside an INSERT value is ignored, and
every statement in a multi-statementdbDeltais captured. - Cleanup scoping. Only confident removals count, and only inside the
plugin-rootuninstall.php(a top-level statement or a function it invokes) or
a registered callback matched case-insensitively. A dead function in
uninstall.php, a$wpdb->prepare(...)-only drop, and apattern/dynamic
removal no longer credit cleanup. - Never crash. A scan survives an unreadable directory, and the first pass is
guarded like the second.
Added
- The WordPress core allowlist now covers roles (
wp_user_rolesand friends),
uninstall_plugins,recently_activated, and more core cron hooks — so a
generateduninstall.phpcan never emit a delete for them.
Changed
- The generator rebuilds the
{prefix}token from$wpdb->prefixfor options,
cron, and transients (not only tables), wherever it appears in a key. - The grader counts unique keys rather than call sites, treats unknown-autoload
options as autoloaded, caps the score when there is no uninstall routine, and
reports low coverage instead of "creates no data" for an all-dynamic plugin. - Scanned source is escaped before it reaches the terminal report.
Full details are in the changelog.