Repository navigation
Audits Abilities Verification
20 abilities registered, verified statically and then against a live
WordPress 7.1 + WooCommerce environment (wp-env, Abilities API present).
The audit found three accuracy failures, all in the discovery abilities — the ones an agent calls first to decide what to do next. None were security issues; all three made the plugin describe itself incorrectly. All three are fixed, along with eight lower-severity findings.
Verification evidence: 1300 PHPUnit tests pass (4 pre-existing
Map_Embed_Render_Test failures, confirmed identical on a clean tree, plus
1 pre-existing skip), phpcs clean on all changed source, runtime
enumeration and permission roundtrip captured below.
Static enumeration by reflection found 20 concrete Abstract_Ability
subclasses; wp_get_abilities() on the live site returns the same 20 with
the same names. Registration fires correctly; no source-only or
runtime-only divergence.
Abilities are auto-discovered — Abilities_Registry globs
includes/abilities/{info,inserters,configurators,settings}/class-*.php —
so there is no hardcoded list to drift. (generators/ is wired but empty.)
Registration goes through Abstract_Ability::register(), which calls
wp_register_ability() indirectly to dodge Plugin Check's static
"requires WP 6.9" scan, so the canonical grep 'wp_register_ability('
enumeration finds one call site rather than 20 — worth knowing for any
future audit of this tree.
| Registered category | Count | Abilities |
|---|---|---|
info |
6 |
list-abilities, list-blocks, list-extensions, list-dynamic-tag-sources, get-post-blocks, find-blocks
|
blocks |
10 |
add-block, add-child-block, add-accordion-item, add-tab, add-timeline-item, update-block, batch-update, configure-custom-css, configure-shape-divider, delete-block
|
settings |
4 |
get-settings, update-settings, get-global-css, update-global-css
|
All 20 are show_in_rest: true and inherit meta.public: true.
Every callback was read end-to-end and compared against its claim. No
readonly: true ability writes anywhere — no $wpdb calls, no option or
post writes, no filesystem or cron effects, no non-GET delegates. No
verify-ignore suppressions were needed anywhere in the tree.
| Ability | Claim | Result | Evidence |
|---|---|---|---|
all 6 info abilities |
readonly, idempotent | OK | read the block registry / post content / extension configs only |
get-settings, get-global-css
|
readonly, idempotent | OK |
Settings::get_settings(); theme custom_css post read |
delete-block |
destructive | OK |
wp_update_post at configurators/class-delete-block.php:197
|
| 5 inserters | idempotent=false | OK | each call appends another block |
update-block, batch-update, configure-*
|
idempotent | OK | attribute merges / wholesale replacement; repeating is a no-op |
update-settings, update-global-css
|
idempotent | OK | field-merge and wholesale replace respectively |
delete-block keeps idempotent: false on purpose, now documented in
code: targeting is by block index, and indices shift after a removal,
so a repeated call deletes a different block. (Declaring it idempotent
would also flip its REST routing from POST to DELETE, since core maps
destructive && idempotent → DELETE.)
Exercised via WP_Ability::check_permissions() against four real user
contexts. Every callback is Shape A (current_user_can( '<cap>' )); no
Shape B-bad (WP_REST_Request in a permission callback), no Shape E
(literal true), no __return_true.
| Ability | Capability | anon | subscriber | editor | admin |
|---|---|---|---|---|---|
list-abilities, list-blocks, list-extensions
|
read |
deny | allow | allow | allow |
list-dynamic-tag-sources, get-post-blocks, find-blocks
|
edit_posts |
deny | deny | allow | allow |
| all inserters + configurators | edit_posts |
deny | deny | allow | allow |
get-settings, update-settings
|
manage_options |
deny | deny | deny | allow |
get-global-css, update-global-css
|
edit_css |
deny | deny | allow¹ | allow |
¹ edit_css maps to unfiltered_html, which editors hold on single-site
and only super-admins hold on multisite — the same gate as the Customizer's
Additional CSS panel.
Two things worth recording:
-
The layering is right. Content-modifying abilities gate on
edit_postsat the ability level and then re-checkcurrent_user_can( 'edit_post', $post_id )against the specific target post insideBlock_Inserter(class-block-inserter.php:49) andBlock_Configurator(:48,:407,:577). Holdingedit_postsdoes not grant write access to a post the user cannot edit. This was checked specifically forconfigure-custom-cssandconfigure-shape-divider, which have noedit_postcall of their own and rely entirely on the helper — they are covered. -
The three
readgates are deliberate, not an oversight.tests/phpunit/abilities-security-test.phpexplicitly asserts that a subscriber can list abilities and blocks. Left unchanged.
Machine-checked across all 20. All six lints pass: additionalProperties: false declared on every object schema, every entry in every required
array has a non-empty description, no empty or single-value enums, no
$ref, and every default is a static literal (get-settings correctly
uses new \stdClass() for its empty properties).
Note that enum contents are a separate axis from enum shape — F2 and F3 below were content failures on schemas that passed every structural lint.
info/class-list-abilities.php derived each ability's category from its
name prefix (inserter / configurator / info / settings) rather
than reading the category it was registered with. The two vocabularies
disagreed: no ability was ever reported as blocks (10 are registered
there), get-global-css was reported as info because the name starts
with get-, and update-global-css as configurator.
An agent filtering {"category": "settings"} got 2 abilities and never
discovered the two global-CSS ones.
Fixed: infer_category() deleted; the ability now reports
$config['category'], and the enum is all | info | blocks | settings.
Runtime confirmation — category=settings now returns 4, category=blocks
returns 10, unfiltered returns {"blocks":10,"info":6,"settings":4}.
normalize_category() mapped blocks into layout / interactive /
visual / dynamic using legacy designsetgo-* slugs that no block uses
any more. 66 of 68 blocks declare "category": "designsetgo" → all became
layout; flip-card-face and section-divider declare "design" → fell
through to the visual default. interactive and dynamic returned zero
blocks, and every block's reported category was wrong.
Fixed: the synthetic remap is gone. Blocks now report category
verbatim from block.json, plus a group sourced from
includes/admin/blocks-registry.json — the same file behind the Blocks &
Extensions admin screen, so the grouping matches what site owners already
see. The input filter is now group, with its enum derived from the
registry so a new group becomes filterable without touching the ability.
Runtime confirmation:
total=68 groups={"containers":3,"forms":12,"interactive":7,
"ui":18,"uncategorized":20,"widgets":8}
verbatim categories={"designsetgo":66,"design":2}
The group enum hardcoded five groups. A sixth, woocommerce, is
registered by class-dynamic-tags-sources-woo.php:52 whenever WooCommerce
is active. Because the schema also sets additionalProperties: false,
{"group": "woocommerce"} was rejected by schema validation before the
callback ran — so the six Woo bindings sources could not be scoped to at
all, which is exactly the filter an agent building a product loop reaches
for.
Fixed: the enum is now read from the live registry
(Registry::instance()->all_groups()), guarded by class_exists() with a
fallback to the built-in five. Sources register on init priority 6 and
abilities at priority 9, so the registry is populated by the time
get_config() runs — and the enum correctly omits woocommerce when Woo
is inactive. Runtime confirmation: enum is post, site, archive, user, custom-fields, woocommerce, and {"group":"woocommerce"} returns all 6
designsetgo/woo-* sources.
update-block, batch-update, configure-custom-css, and
configure-shape-divider passed no annotations key. Core defaults every
flag to false, so nothing was actively misrepresented, but they were the
only four abilities with no declared contract and no instructions string.
All four now declare the full triple plus instructions.
get-settings and get-global-css declared readonly + idempotent; the
six info abilities — equally pure reads — declared readonly only. Every
ability now declares all three flags explicitly, so tools/list has one
consistent shape.
EXTENSION_META had drifted from includes/extension-configs/:
-
Shipped but undescribed —
interactions,schema,style-binding, andvisibilityhad config files but no META entry, so they were returned with an auto-generated label and an empty description. Two of them,visibility(dsgoVisibility) andstyle-binding(dsgoStyleBinding), are among the most rule-heavy extensions in the plugin — an agent got the raw attribute schema and no guidance on the rule shape. -
Described but never emitted —
dynamic-tagshad a full META entry but no matching config file, so the loop never reached it.
All four are now documented (including the JSON-LD block list for schema
and the rule shapes for visibility / style-binding); the dead
dynamic-tags entry is removed. META and configs now match 19/19 exactly.
The ability tells agents "call this first", but its output carried no
readonly / destructive information, forcing a second round-trip to REST
introspection. It now emits an annotations object per ability.
list-abilities, list-blocks, and list-extensions gate on read,
which subscribers hold. Initially flagged as over-permissive, but
abilities-security-test.php contains explicit tests asserting subscribers
can call them — this is a tested design decision about a non-privileged
block catalog, not drift. Left as-is and now documented in
docs/api/ABILITIES-API.md.
Codes were generic (invalid_post, permission_denied, block_not_found,
missing_post_id, …) and could collide with another plugin's codes in an
agent's error-matching logic. All ability-specific codes are now prefixed
designsetgo_, including the HTTP-status map in
Abstract_Ability::get_default_status_for_error() and the ~25 assertions
in the ability test files.
rest_forbidden deliberately keeps its unprefixed name — it is the code
WordPress core uses for the same condition and REST clients already match
on it.
The eight top-level settings groups (performance, forms, animations,
security, integrations, sticky_header, draft_mode, llms_txt) had
no description. All eight now do, including the note that
animations.block_animations is replaced wholesale while other list fields
merge positionally.
-
docs/api/ABILITIES-API.mddocumented 14 of 20 abilities — missing all four settings abilities,configure-custom-css, andlist-dynamic-tag-sources— and labelled the info group "(5)" when there are 6. Now complete, with a category table, a Settings Abilities section, a runtime-verified permissions matrix, and a corrected error-code table. -
docs/ARCHITECTURE.mdreferencedincludes/abilities/class-abilities-provider.php(no such file) and aregister_ability()function (the real one iswp_register_ability()). Replaced with the real auto-discovery architecture and a real ability as the example. -
docs/testing/TESTING-ABILITIES-API.mdused the deadcategory=layoutfilter and unprefixed error codes. Updated.
(An earlier draft of this report listed designsetgo/add-animation as a
nonexistent ability referenced in ARCHITECTURE.md. That was wrong — it is a
JS filter namespace in an extension example, not an ability.)
includes/admin/blocks-registry.json lists 48 of 68 registered blocks.
The 20 missing ones now surface honestly as group: "uncategorized" in
list-blocks output:
advanced-heading, chart, comparison-table, dynamic-image, fifty-fifty, flip-card-back, flip-card-front, heading-segment, product-categories-grid, product-showcase-hero, query, query-filter, query-group-header, query-no-results, query-pagination, query-results, section-divider, sticky-sections, timeline, timeline-item
This matters beyond the abilities surface: that file drives the Blocks & Extensions admin screen, so those 20 blocks appear to have no enable/disable control there. Worth a separate look — it is a product decision about which groups they belong to, not something this audit should guess at.
Rerun the runtime checks after any change to the discovery abilities:
npx wp-env run cli wp eval '
$m = array_filter( wp_get_abilities(), fn($a) => strpos($a->get_name(),"designsetgo/")===0 );
echo count($m) . PHP_EOL;'
npx wp-env run tests-cli --env-cwd=wp-content/plugins/designsetgo \
vendor/bin/phpunit --filter AbilitiesAuto-generated from
docs/audits/ABILITIES-VERIFICATION.md. To update, edit the source file and changes will sync on next push to main.
- Accordion
- Advanced Heading
- Blobs
- Breadcrumbs
- Card
- Chart
- Comparison Table
- Countdown Timer
- Counter Group
- Divider
- Dynamic Image
- Fifty Fifty
- Flip Card
- Form Builder
- Grid
- Hotspot
- Icon
- Icon Button
- Icon List
- Image Accordion
- Map
- Modal
- Modal Api Reference
- Modal Auto Triggers
- Modal Fse Compatibility
- Modal Gallery Navigation
- Modal Trigger
- Pill
- Product Categories Grid
- Product Showcase Hero
- Progress Bar
- Query
- Query Filter
- Query Group Header
- Query No Results
- Query Pagination
- Query Results
- Row
- Scroll Accordion
- Scroll Marquee
- Scroll Slides
- Section
- Section Divider
- Slider
- Star Rating
- Sticky Sections
- Table Of Contents
- Tabs
- Text Path
- Timeline
- Background Video
- Block Animations
- Clickable Group
- Conditional Visibility
- Custom Css
- Draft Mode
- Dynamic Tags
- Expanding Background
- Grid Mobile Order
- Grid Span
- Hover Effects
- Max Width
- Responsive Visibility
- Reveal Control
- Scroll Parallax
- Sticky Header
- Style Binding
- Svg Patterns
- Text Alignment Inheritance
- Text Reveal
- Abilities Api
- Abilities Api Guide
- Block Bindings
- Draft Mode Api
- Form Webhooks
- Generation Contract
- Interactive Blocks
- Layout Flexibility
- Markdown Content Negotiation
- Rest Api Reference
- Wp Cli Reference
- Ai Assisted Development
- Best Practices Summary
- Block Controls Organization
- Block Development Best Practices Comprehensive
- Block Exclusion Guide
- Deploying To Wordpress Org
- Design System
- 2026 04 16 Blocks Editor Ux Design
- 2026 04 17 Theme 3 Inspector Ia
- 2026 04 21 Query Block Onboarding
- 2026 04 21 Query Capable Layout Blocks Design
- 2026 04 27 Block Roadmap Ideas
- 2026 07 01 Shape Divider Theme Inheritance
- 2026 07 02 Icon Block Dynamic Render Pilot
- 2026 07 06 Section Divider Block Design
- 2026 07 06 Section Style Variations Fse Design
- 2026 07 06 Section Styles Editor Preview
- 2026 07 07 Row Grid Overlay Hover Parity Design
- 2026 07 21 Conditional And Dup Label Sourcing
- 2026 07 23 Theme Block Type Animation Defaults
- 2026 08 16 Chart Block
- 2026 08 16 Greenshift Gap Roadmap
- 2026 08 17 Woocommerce Surface
- 2026 08 24 Loop Carousel
- 2026 08 24 Star Rating Block
- 2026 09 17 Abilities Drift Prevention
- 2026 09 17 Abilities Drift Prevention Implementation
- 2026 09 29 Existing User Regression Fixes
- 2026 09 29 Release Preflight Fixes
- Readme
- 2026 07 02 Block Authorability Audit
- 2026 09 29 Regression Fixes
- 2026 09 29 Release 2.9.0
- 2026 09 29 Release Fixes
- 2026 10 19 Bug Hunt
- 2026 10 20 Bug Hunt Round 2