Skip to content

Automattic/wordpress-atmosphere / .agents/skills/review

Shared base for reviewing a diff, a branch or a PR in this plugin. How to read the diff, which repo guidelines to load for the changed paths, and the shape of a finding. Used by the code-review and security-audit agents.

FileKindSize
SKILL.mdskill md7.1 KB
guidelines/accessibility.mdmarkdown781 B
guidelines/authorization.mdmarkdown2.8 KB
guidelines/content-exposure.mdmarkdown6.8 KB
guidelines/cron.mdmarkdown1.9 KB
guidelines/hooks.mdmarkdown2.3 KB
guidelines/oauth.mdmarkdown3.6 KB
guidelines/output.mdmarkdown610 B
guidelines/records.mdmarkdown2.1 KB
guidelines/remote-fetch.mdmarkdown5.3 KB
guidelines/supply-chain.mdmarkdown582 B
guidelines/uninstall.mdmarkdown2.0 KB
guidelines/well-known.mdmarkdown1.4 KB
judge.mdmarkdown1.2 KB

guidelines/uninstall.md

View on GitHub
# Uninstall and cleanup

What is left behind after disconnect, deactivation and uninstall.

Applies to: `uninstall.php`, deactivation and disconnect paths, `includes/oauth/class-nonce-storage.php`

- Uninstall removes all stored tokens and keys, and nothing sensitive stays in `wp_options` or `wp_postmeta`.
- OAuth credentials are revoked at the PDS before the local delete (see "Revocation" in `oauth.md`).
- Deactivation clears scheduled events (see "Unscheduling" in `cron.md`).
- Deletion goes through `delete_transient()` / `delete_option()`, never a raw `DELETE FROM wp_options`, so the object cache is invalidated with the row.

## Transients in an object cache

With a persistent object cache (Redis, Memcached), transients live in the cache, not in `wp_options`. A `SELECT … LIKE '_transient_…%'` sweep returns no rows there and cleans nothing. Either:

1. track dynamic keys at write time in a registry and iterate it on uninstall; or
2. document the residual, confirm the leftover keys hold no decryptable secrets, and keep their TTLs short.

## Constants in pre-bootstrap code

`uninstall.php` runs before the plugin autoloader, so it cannot reference `Nonce_Storage::PREFIX` without bootstrapping it. Keep the literal in `uninstall.php` with a `MUST stay in lock-step with X::Y` comment naming the constant, so a rename finds both by grep. Without it, a renamed constant silently orphans rows the sweep no longer matches.

## Multisite

Everything in a typical `uninstall.php` runs against the current blog (`delete_option`, `$wpdb->postmeta`). On a network-activated install, the other blogs keep their full state, encrypted credentials included. Either:

1. wrap the cleanup in `is_multisite()` / `get_sites()` / `switch_to_blog()`; or
2. document multisite as unsupported in `readme.txt`, and check the rest of the plugin makes no multisite assumptions either.

A plugin with no `switch_to_blog()` anywhere in `includes/` is implicitly option 2; the fix is documentation, not code.
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall