Download the PHP package kooba/craft-content-audit without Composer
On this page you can find all versions of the php package kooba/craft-content-audit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package craft-content-audit
Content Audit for Craft CMS
Audit your Craft CMS 5 content for common issues. Currently detects:
- Orphaned Assets — files uploaded to a volume that aren't referenced by any entry
- Missing Alt Text — images that have no alt text set
- Large Assets — files over 2 MB (warning) or 5 MB (critical); threshold configurable via
config/content-audit.php - Broken References — entries whose relational fields point to disabled or deleted elements
Results are stored in the database and persist between page loads. Each issue links directly to the offending element in the Control Panel.
Installation
Via Composer (local dev)
-
Clone this repo alongside your Craft project.
-
In your Craft project's
composer.json, add the repository and require the plugin: -
Run:
- The Content Audit item will appear in your CP sidebar.
Via Plugin Store (once published)
Search for "Content Audit" in the Craft Plugin Store and click Install.
Usage
- Go to Content Audit in the Control Panel sidebar.
- Click Run Audit.
- Review the results table. Each issue links directly to the offending element so you can fix or delete it.
Extending
Adding a new auditor is straightforward:
-
Create a class in
src/auditors/implementingAuditorInterface: - Register it in
AuditService::init():
That's it — the CP table picks it up automatically.
Plugin Store Submission Checklist
- [x] Hosted on GitHub (public repo)
- [x]
CHANGELOG.mdkept up to date - [x] Icon at
icon.svg(square SVG, ideally 150×150) - [x]
composer.jsonextra.craftcms.pluginfields complete - [x] Developer account at id.craftcms.com
- [x] Plugin submitted at plugins.craftcms.com/new
Craft Plugin Store review typically takes a few business days.
Craft 5 Development Notes
Controllers: Do not use requireCpAccess() — it doesn't exist in Craft 5. Use this pattern instead:
Twig templates: Never put double quotes inside a double-quoted string. If the string contains "quotes", use single quotes for the outer string:
Requirements
- Craft CMS 5.0+
- PHP 8.2+
License
Craft — see LICENSE.md