audit-blocks-deep
Deep AI audit of all blocks — runs structural checks first, then uses AI to review content quality, descriptions, grammar, admin render justification, wrapper usage, and empty-state messages.
Run a full Level 2 audit on all blocks. Runs the structural script first, then uses AI to review content quality.
Step 1 — Run the structural script
node $(claude plugin path nectarblocks)/scripts/audit-blocks.js
Show the output. If there are ✗ issues, tell the user to fix them before proceeding with the deep review. Warnings are fine to continue.
Step 2 — AI content review
For each block, read the following files and apply the checks below:
block.jsonfields.jsonrender.phprender-admin.php(if exists)
Content checks
Block title and description (block.json)
- Is the title clear and human-readable? Flag anything that looks auto-generated or generic (e.g. "Hero Block", "My Block", "Sample Block")
- Is the description a meaningful sentence? Flag empty, placeholder, or nonsensical descriptions
- Grammar and spelling — flag any errors
ACF field labels (fields.json)
- Do field labels make sense for what they describe?
- Are there fields with default labels like "Text", "Image", "Field Label"?
- Flag any field with an empty or placeholder label
- Check for typos and grammar in labels, instructions, and descriptions — suggest the corrected text
- Note: only label/instructions/description are safe to edit — never suggest changing
nameas it maps to saved database content
Wrapper attributes
- Every
render.phpmust usepx_get_block_wrapper_attributes()— never build wrapper classes/attributes manually - Flag any block that constructs its own
$wrapper_classstring or builds wrapper attributes by hand
Admin render justification (render-admin.php)
- Create
render-admin.phpONLY when the block hides content behind interaction (sliders, sticky scroll, opacity-0 slides, click/scroll-to-reveal) - Static layout blocks (grids, text, images in normal flow) do NOT need it —
px_get_block_wrapper_attributes()addspointer-events-noneautomatically - Flag blocks with interactive/hidden content that are missing
render-admin.php - Flag blocks with
render-admin.phpthat appear to have a simple static layout (may be unnecessary) - Flag
render.phpfiles that still contain inlineis_admin()conditions (logic should live inrender-admin.php, not scattered inrender.php)
Empty-state messages
render-admin.phpmust show a descriptive message when required content (fields, posts, images) is empty — so the editor knows what to addrender.phpmust NOT show any empty-state messages — render nothing on the frontend when content is missing
render.php cleanliness
- Is there commented-out code that should be cleaned up?
- Are there obvious placeholder comments like
// Block content hereleft from scaffolding?
Output format
Group by block. For each block:
{block-name}
Structural: ✔ passed
Title: ✔ clear
Description: ✗ "Sample description for hero block" — generic placeholder, update it
Fields: ⚠ field "text_1" has a generic label — rename to something descriptive
Wrapper: ✔ uses px_get_block_wrapper_attributes()
Admin render: ✔ justified (interactive slider)
Empty states: ⚠ render-admin.php missing empty-state message for images field
End with a summary count of findings across all blocks, then ask: "Fix all issues automatically? (or specify which blocks/rules to fix)" — only proceed after the user confirms.