{"id":359443,"date":"2026-08-31T01:31:17","date_gmt":"2026-08-31T01:31:17","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/attic-safe-database-audit\/"},"modified":"2026-09-10T16:39:14","modified_gmt":"2026-09-10T16:39:14","slug":"attic-safe-database-audit","status":"publish","type":"plugin","link":"https:\/\/vi.wordpress.org\/plugins\/attic-safe-database-audit\/","author":23097907,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.0.0","stable_tag":"2.0.0","tested":"7.1","requires":"6.5","requires_php":"8.1","requires_plugins":null,"header_name":"Attic \u2014 Safe Database Cleanup (Undo-Friendly)","header_author":"Bishal Shrestha","header_description":"A read-only database audit that quarantines instead of deleting, and searches your code before it calls anything orphaned.","assets_banners_color":"0c1118","last_updated":"2026-09-10 16:39:14","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/profiles.wordpress.org\/rainynewt\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":132,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"rainynewt","date":"2026-08-31 01:30:44","revision":3673275},"1.0.1":{"tag":"1.0.1","author":"rainynewt","date":"2026-08-31 17:26:39","revision":3674723},"2.0.0":{"tag":"2.0.0","author":"rainynewt","date":"2026-09-10 16:39:14","revision":3690212}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3673275,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3673275,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3673275,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3673275,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","2.0.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[279555,17806,234599,280115,151481],"plugin_category":[52,54,59],"plugin_contributors":[271439],"plugin_business_model":[],"class_list":["post-359443","plugin","type-plugin","status-publish","hentry","plugin_tags-autoloaded-options","plugin_tags-database-cleanup","plugin_tags-database-optimization","plugin_tags-orphaned-tables","plugin_tags-site-health","plugin_category-performance","plugin_category-security-and-spam-protection","plugin_category-utilities-and-tools","plugin_contributors-rainynewt","plugin_committers-rainynewt"],"banners":{"banner":"https:\/\/ps.w.org\/attic-safe-database-audit\/assets\/banner-772x250.png?rev=3673275","banner_2x":"https:\/\/ps.w.org\/attic-safe-database-audit\/assets\/banner-1544x500.png?rev=3673275","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/attic-safe-database-audit\/assets\/icon-128x128.png?rev=3673275","icon_2x":"https:\/\/ps.w.org\/attic-safe-database-audit\/assets\/icon-256x256.png?rev=3673275","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Every plugin you've ever installed left something behind. Bloated options, dead cron jobs, orphaned database tables, leftover transients \u2014 years of \"uninstalled\" plugins that never actually cleaned up after themselves. This bloat slows down every page load, because WordPress autoloads a lot of it on every single request. If Site Health told you that you have too many autoloaded options, this is what to do about it.<\/p>\n\n<p>Attic finds it. Safely.<\/p>\n\n<p><strong>The problem with every other cleanup plugin:<\/strong> they delete first and ask questions later. One false positive and you've lost site settings.<\/p>\n\n<p><strong>How Attic is different \u2014 Quarantine, Never Delete:<\/strong>\n- Tables you quarantine are renamed, not dropped \u2014 restorable by default for 30 days (configurable)\n- Every option is backed up before removal\n- Nothing is called orphaned with confidence until Attic has confirmed the owning plugin's <em>actual files<\/em> are gone from disk and searched your code for references \u2014 weak evidence stays at \"review\" rather than becoming a recommendation<\/p>\n\n<p><strong>What Attic finds:<\/strong><\/p>\n\n<ul>\n<li><strong>Autoloaded option bloat<\/strong> \u2014 oversized options that load on every page request, ranked by size against Site Health's 800 KB line.<\/li>\n<li><strong>Ghost cron events<\/strong> \u2014 scheduled hooks with no registered callback, firing forever and doing nothing.<\/li>\n<li><strong>Orphaned tables<\/strong> \u2014 tables no installed plugin claims, with reclaimable megabytes up front.<\/li>\n<li><strong>Stranded transients<\/strong> \u2014 expired timeout pairs and orphaned rows.<\/li>\n<li><strong>Leftovers from deleted plugins<\/strong> \u2014 data whose owning plugin is absent from disk entirely.<\/li>\n<li><strong>Orphaned meta<\/strong> \u2014 post meta, comment meta, user meta, and term meta whose parent row no longer exists.<\/li>\n<\/ul>\n\n<p>Two rules outrank every feature:<\/p>\n\n<ol>\n<li><strong>Quarantine, never delete.<\/strong> Options are stored before removal. Tables are renamed (<code>wp_attic_quarantined_*<\/code>), never dropped until a purge window passes.<\/li>\n<li><strong>Nothing is called orphaned until your code has been searched for it.<\/strong> Attic reads through your plugins, mu-plugins and themes, plus <code>wp-config.php<\/code>, looking for every candidate name before promoting anything to high confidence. (PHP, JS, JSON and <code>.inc<\/code> files; <code>node_modules<\/code>, <code>vendor<\/code>, <code>dist<\/code> and <code>build<\/code> directories are skipped.)<\/li>\n<\/ol>\n\n<p>Every finding shows its evidence inline: which rule fired, what it attributed to and whether that plugin exists on disk, how many code references were found, and the size. A finding you cannot audit is a finding you should not act on.<\/p>\n\n<p><strong>Who this is for:<\/strong>\n- Site owners who've installed\/removed a lot of plugins over the years\n- Agencies maintaining client sites and doing housekeeping\n- Anyone whose Site Health page flags \"autoloaded options\" and doesn't know what to do about it<\/p>\n\n<h4>How is this different from WP-Optimize or Advanced Database Cleaner?<\/h4>\n\n<p>Those are established cleanup tools with direct delete\/optimize actions. Attic takes a different default: nothing is permanently deleted up front \u2014 flagged tables are renamed (<code>wp_attic_quarantined_*<\/code>) and options are backed up first, with one-click restore inside the purge window (default 30 days, configurable). Permanent removal only happens once a quarantined batch passes the purge window un-restored, or if you purge it yourself on purpose. Attic also checks plugin files on disk and searches your code for references before promoting findings to high confidence, so uncertain items stay at \"review.\"<\/p>\n\n<h4>WP-CLI<\/h4>\n\n<p>Run scans from the command line for automation and CI\/CD pipelines:<\/p>\n\n<ul>\n<li><code>wp attic scan<\/code> \u2014 run a full database audit<\/li>\n<li><code>wp attic findings<\/code> \u2014 list and filter findings<\/li>\n<li><code>wp attic quarantine<\/code> \u2014 manage quarantine batches<\/li>\n<li><code>wp attic status<\/code> \u2014 check plugin status<\/li>\n<li><code>wp attic map status<\/code> \u2014 inspect the bundled attribution map<\/li>\n<\/ul>\n\n<h4>Scheduled Scans<\/h4>\n\n<p>Catch regressions without manual triggers. Schedule scans via WP-Cron or system cron, and receive an email digest when complete:<\/p>\n\n<ul>\n<li>Daily, weekly, or monthly scan frequency<\/li>\n<li>Email summary with findings count, new vs resolved findings, and total autoloaded size<\/li>\n<li>Comparison between scans to detect regressions<\/li>\n<\/ul>\n\n<h4>Trend Charts<\/h4>\n\n<p>Visualize your database health over time:<\/p>\n\n<ul>\n<li>Autoload size trend over the last 10 scans<\/li>\n<li>800 KB Site Health limit indicator<\/li>\n<li>Trend direction (increasing, decreasing, stable)<\/li>\n<li>Export chart as PNG or table as CSV<\/li>\n<\/ul>\n\n<h4>Multisite Support<\/h4>\n\n<p>Network admin dashboard for managing database health across all sites:<\/p>\n\n<ul>\n<li>Aggregated findings across the network<\/li>\n<li>Per-site scan status and autoload metrics<\/li>\n<li>Network-wide scan capability<\/li>\n<li>Proper handling of network-active plugins<\/li>\n<\/ul>\n\n<h4>Attribution Map<\/h4>\n\n<p>A curated map of plugin prefixes to their owning plugin, used to attribute\norphaned data. The map ships with the plugin and is updated with plugin\nreleases \u2014 Attic makes no outbound network requests.<\/p>\n\n<ul>\n<li><code>wp attic map status<\/code> \u2014 show the bundled map version and entry count<\/li>\n<li>Add your own attributions with the <code>attic_prefix_map_entries<\/code> filter<\/li>\n<\/ul>\n\n<h4>Third-party libraries<\/h4>\n\n<p>Attic bundles Chart.js 4.4.4 (MIT) at <code>assets\/vendor\/chart.umd.min.js<\/code>, used\nonly to draw the autoload trend chart in the admin. It is served from your own\nsite. Attic makes no outbound network requests of any kind.<\/p>\n\n<h3>Filters<\/h3>\n\n<p>Protecting things from ever being flagged:<\/p>\n\n<ul>\n<li><code>attic_protected_options<\/code> \u2014 additional never-flag option names<\/li>\n<li><code>attic_protected_cron_hooks<\/code> \u2014 additional never-flag cron hooks<\/li>\n<li><code>attic_protected_tables<\/code> \u2014 additional never-flag tables<\/li>\n<li><code>attic_protected_transients<\/code> \u2014 additional never-flag transient names<\/li>\n<\/ul>\n\n<p>Attribution and scanning:<\/p>\n\n<ul>\n<li><code>attic_prefix_map_entries<\/code> \u2014 add or override attribution map entries<\/li>\n<li><code>attic_prefix_map_path<\/code> \u2014 load the attribution map from a different file<\/li>\n<li><code>attic_reference_scan_roots<\/code> \u2014 where the code search looks; for unusual layouts and custom content directories<\/li>\n<li><code>attic_scan_rules<\/code> \u2014 add or remove detection rules<\/li>\n<\/ul>\n\n<p>Behaviour:<\/p>\n\n<ul>\n<li><code>attic_manage_capability<\/code> \u2014 which capability may scan and quarantine (default <code>manage_options<\/code>)<\/li>\n<li><code>attic_purge_after_days<\/code> \u2014 override the quarantine purge window<\/li>\n<li><code>attic_tracked_autoload_options<\/code> \u2014 which options usage tracking watches<\/li>\n<li><code>attic_track_autoload_usage<\/code> \u2014 return false to disable usage tracking entirely<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate.<\/li>\n<li>Go to Tools \u2192 Attic.<\/li>\n<li>Click Scan.<\/li>\n<li>Review evidence for each finding (confidence, size, code references).<\/li>\n<li>Quarantine what you want gone \u2014 recoverable for 30 days by default (configurable) if you change your mind.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"is%20this%20safe%3F\"><h3>Is this safe?<\/h3><\/dt>\n<dd><p>The scan is read-only. Nothing changes until you take an explicit, confirmed action. Core options like <code>siteurl<\/code>, <code>active_plugins<\/code> and <code>cron<\/code> can never be flagged, and neither can anything on your own protected list or the <code>attic_protected_options<\/code> filter.<\/p><\/dd>\n<dt id=\"how%20do%20i%20undo%20something%3F\"><h3>How do I undo something?<\/h3><\/dt>\n<dd><p>Tools \u2192 Attic \u2192 Quarantine. Every action creates a batch; restore a whole batch in one click. Batches auto-purge after 30 days (configurable).<\/p><\/dd>\n<dt id=\"why%20does%20my%20finding%20say%20%22review%22%20instead%20of%20%22high%22%3F\"><h3>Why does my finding say \"review\" instead of \"high\"?<\/h3><\/dt>\n<dd><p>For most rules, high confidence requires the owning plugin to be absent from disk (or the option to be size-flagged <em>and<\/em> unread), <strong>and<\/strong> zero literal <strong>and<\/strong> zero prefix references anywhere in your code. Dynamic option names never literal-match, so even a weak signal keeps a finding at \"review\". If your filesystem could not be read, everything is marked unverified rather than guessed at.<\/p>\n\n<p>Two rules are exceptions, because a code search cannot tell you anything useful about them: an expired transient and a meta row whose parent is gone are facts about your database, not guesses about your code. Those are reported as high confidence on their own evidence.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20external%20object%20caches%3F\"><h3>Does it work with external object caches?<\/h3><\/dt>\n<dd><p>Yes \u2014 when Redis\/Memcached is active, transients never touch the options table, and Attic says so instead of showing a meaningless clean bill of health.<\/p><\/dd>\n<dt id=\"multisite%3F\"><h3>Multisite?<\/h3><\/dt>\n<dd><p>Yes. Single-site, subdirectory multisite, and subdomain multisite installs all work. Network-wide fleet scanning is available via the network admin dashboard.<\/p><\/dd>\n<dt id=\"which%20plugins%20does%20attic%20work%20with%3F\"><h3>Which plugins does Attic work with?<\/h3><\/dt>\n<dd><p>Attic works with <strong>all WordPress plugins<\/strong> \u2014 it's a read-only cleanup tool that doesn't touch plugin data unless you explicitly quarantine it. The attribution map helps identify which plugin owns which database entries, but the scan works regardless of whether a plugin is in the map.<\/p>\n\n<p>Plugins with known prefixes in the attribution map get named attribution, and the \"leftovers from a deleted plugin\" rule relies on the map to know which prefixes belonged to which plugin.<\/p>\n\n<p>Data belonging to a plugin that is not in the map is still found by the other rules \u2014 an oversized autoloaded option, an orphaned table or a dead cron event is detected either way. It just shows its owner as \"unknown\". You can add your own entries with the <code>attic_prefix_map_entries<\/code> filter.<\/p><\/dd>\n<dt id=\"does%20attic%20delete%20plugin%20data%3F\"><h3>Does Attic delete plugin data?<\/h3><\/dt>\n<dd><p>No. Attic quarantines data (renames tables, copies options), never deletes. You can restore anything from Quarantine within the purge window (default 30 days, configurable).<\/p><\/dd>\n<dt id=\"what%20about%20multisite%20network-active%20plugins%3F\"><h3>What about multisite network-active plugins?<\/h3><\/dt>\n<dd><p>Attic correctly detects network-active plugins and never flags their data as orphaned, even if they're deactivated on individual sites.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>New: Orphaned meta detection (post, comment, user, term meta with a missing parent row).<\/li>\n<li>New: Scheduled scans with an email digest, WP-CLI support, and a network dashboard for multisite.<\/li>\n<li>New: Autoload trend chart, exportable as PNG or CSV.<\/li>\n<li>Fix: Several rules were skipping findings they should have caught (stranded transients, three of four meta tables). Re-scanning is recommended.<\/li>\n<li>Fix: Orphaned-table detection no longer flags other sites on shared multisite\/database setups.<\/li>\n<li>Improved: No more per-page-load database writes; scans and quarantine are unaffected.<\/li>\n<li>Improved: No CDN or outbound requests \u2014 everything ships with the plugin.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fix: Quarantine action now correctly updates finding state (broken by SQL syntax error).<\/li>\n<li>Fix: Orphan tables rule no longer flags Attic's own tables on sites with nested table prefixes (e.g. wp_pc_attic_*).<\/li>\n<li>Add: Stop scan button to abort long-running scans mid-flight.<\/li>\n<li>Fix: Findings page defaults to latest completed scan instead of showing duplicates across all scans.<\/li>\n<li>Fix: Scan complete state now hides progress bar and stop button cleanly.<\/li>\n<li>Fix: Empty quarantine batches are cleaned up automatically.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial plugin release: read-only database audit with quarantine-based undo, five detection rules, budgeted scan engine, reference scanning, quarantine with batch restore, and attribution map.<\/li>\n<\/ul>","raw_excerpt":"Find and safely remove database junk left behind by deleted plugins \u2014 quarantine first, recoverable by default for 30 days.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/359443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=359443"}],"author":[{"embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/rainynewt"}],"wp:attachment":[{"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=359443"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=359443"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=359443"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=359443"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=359443"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/vi.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=359443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}