Zoo for Craft CMS

Installation

Requirements

  • Craft CMS 5.3 or later
  • PHP 8.2 or later

That is the whole list. Zoo has no runtime dependencies beyond Craft's own, no build step, and makes no outbound HTTP request anywhere. Everything it knows it works out from your own database, your own templates and your own schema.

Zoo is free. There are no editions, no licence key and no licensing code in the plugin.

Install

composer require justinholtweb/craft-zoo
php craft plugin/install zoo

Or find Zoo in the Plugin Store and install it there.

Installing creates three tables — zoo_runs, zoo_findings and zoo_keeps — and nothing else. No project config is written until you change a setting.

Nothing happens until you ask

Zoo does not run on a schedule it chose, does not filter your pages and does not delete anything on install. It has exactly one entry point: Zoo → Take a census.

The first census

Go to Zoo in the control panel and press Take a census. It is queued by default, because on a large site it reads every content row and every template you have and that comfortably outlasts a gateway timeout. Run it now does it in the request instead, which is what you want locally.

When it finishes you get a screen per enclosure, a count each, and — at the bottom — the list of probes that ran. Read that list before you read the counts. It is the part that says whether to believe them.

On a first run it is worth checking three things:

  1. Twig templates and config — the probe should report a number of files searched. If it says the templates directory could not be read, findings from that census cannot account for hard-coded IDs and you should fix the permissions before deleting anything.
  2. Other tables keyed into elements — the number of columns searched should be in the dozens on a plain install, and well over a hundred on a site with Commerce or Formie. A low number means the probe found no foreign keys, which is worth understanding before trusting the result.
  3. Minimum age — the default is seven days, so anything made this week is not reported at all.

What to do about a big number

Nothing, yet. A first census on a site nobody has audited before routinely reports thousands of things, and the right response is to open one enclosure, click Look on a few rows, and read the evidence. Zoo is built so that any single finding can be checked in about fifteen seconds.

The keep list is the other half of that. Anything Zoo is wrong about — and on a first run there will be some — goes on the keep list with a reason, and never comes back.

Permissions

Zoo registers five permissions, and grants none of them to non-admins automatically:

PermissionLets somebody
View the censusRead every screen
Take a censusRun one
Mark things to keepAdd to and remove from the keep list
Move findings to the trashDelete, recoverably
Delete findings permanentlyDelete for good — nested under the one above

Giving an editor the first three is a good default: they can see what the site is carrying and can correct Zoo when it is wrong, without being able to remove anything.