
Gerdoo Orphan Media Cleaner
v1.1.0Mohammadreza Maghsoudipour · 2026年6月23日 上架
Review possible unused images with a resumable reference index and reversible private quarantine. No automatic deletion.
- 正在使用
- 10+
- 评分
- 暂无
- 累计下载
- 458
- 最近更新
- 2026年11月16日
截图
This version replaces the original public-trash approach with manually reviewed private quarantine and recovery. Back up the database, uploads and existing trash before upgrading. Scan results are review candidates, not proof that a file is unused. Test on a staging copy before using it on an important site. Very large media libraries and every third-party integration have not been independently benchmarked.
Gerdoo indexes registered attachment files and supported database references before listing review candidates. A missing reference is not proof that a file is unused. Review custom code, external uses and integrations before quarantine.
- JSON and inert PHP serialized-array/object parsing, numeric IDs, gallery shortcodes, image URLs and CSS references. Opaque custom serialization stays blocked.
- Supported sources: post content/excerpts, postmeta, options, termmeta, usermeta, comments and commentmeta; network metadata on Multisite.
- Protection for original images, intermediate sizes, edit backups and shared attachment files, including PDF preview images.
- Recursive raster-file enumeration, including AVIF; excludes symbolic links, legacy trash, cache and other sites’ upload directories.
- Fresh-scan authorization, file checksums, per-site file locks and recovery journals.
- Multi-checkpoint time-sliced AJAX requests and a resumable WP-CLI runner for long scans; only one worker may advance a scan at a time.
- Deduplicated reference index and indexed active-file reservations. Existing RC quarantine records remain protected through a legacy check.
- Atomic reservation of all attachment-family paths in a short InnoDB transaction; incompatible table engines block new operations.
- On single sites, successful attachment-metadata additions conservatively extend every active scan’s file-owner catalog under a shared database lock; unverified additions and reserved-path conflicts still invalidate scans.
- Changed uploads-directory offsets are re-enumerated with provisional file candidates discarded (up to five retries), rather than trusting a stale iterator offset.
- Private-vault status and the validated per-site storage path are visible to authorized administrators only; display never bypasses required authorization.
- Local attachment records and metadata survive quarantine. Original paths are never silently overwritten during recovery.
- Explicit permanent deletion requires a current complete scan and a typed confirmation. Nothing is purged on a schedule.
- Existing 1.0.0 trash records can be restored or explicitly migrated into private storage.
Database jobs read bounded batches. In the browser, several short checkpoints run per AJAX response. HTML post_content above the ordinary 2 MiB document limit is read in 65,536-character overlapping checkpoints (with a 64 MiB default overall HTML cap); a source checksum is verified before the record is marked complete. Large JSON, serialized structures and unsupported formats still stop the scan safely. A single slow database operation or file can still exceed a request’s budget. Persistent WP-CLI workers can keep a directory iterator open and avoid repeated seeking within the same command, but resuming after process exit still reopens the directory. This is not a promise of suitability for every shared host. Local file operations default to 64 MiB per file. Small reference documents default to 2 MiB, 5,000 references and 32 nesting levels. Unsupported sources stop the scan instead of silently authorizing deletion.
Privacy
The plugin sends no telemetry and makes no runtime requests to external services. Reference indexes can contain internal source identifiers and paths; expired scan indexes are removed in bounded cleanup batches on subsequent scan starts. Quarantine journals are retained for recovery and audit. Preview access requires an authenticated administrator and a nonce. WordPress’ own update and translation services are outside this plugin’s processing.


