bricks_analyze_page
Overview
Analyzes a Bricks page for quality issues across 8 check categories: structure, colors, typography, classes, responsive, accessibility, SEO, and performance. Returns detailed findings with severity levels, element IDs, messages, and fix suggestions.
This is the primary quality assurance tool for Bricks pages. It identifies issues like incorrect heading hierarchy, missing alt text, poor color contrast, unused classes, missing responsive breakpoints, and SEO deficiencies.
Use this as part of the Phase 5 polish workflow after building pages, before publishing. Pair with bricks_fix_audit_issues to auto-fix many of the detected problems.
Key Features
When to Use
You need to identify accessibility issues like missing alt text or poor color contrast
You want to verify heading hierarchy (h1 count, no level gaps)
You need to check if global classes are being used properly
You want performance metrics on element count, nesting depth, and DOM complexity
Bricks Builder version 1.9 or higher
When NOT to Use
You want a quick pass/fail pre-publish gate — use bricks_validate_page instead
You want to fix issues automatically — run this first, then use bricks_fix_audit_issues
Parameters
Warning: Undefined array key "param_enum_values" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 28
page_idnumberREQUIREDWarning: Undefined array key "param_enum_values" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 28
checksarray of strings (enum)optionalall checksCode Examples
Warning: Undefined array key "example_output" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 12
Full page analysis
Runs all 8 checks on a page to get a comprehensive quality report.
bricks_analyze_page({
page_id: 33
})
// Returns findings like:
// { category: "accessibility", severity: "warning",
// element_id: "abc123", message: "Image missing alt text",
// suggestion: "Add descriptive alt text to the image element" }Warning: Undefined array key "example_output" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 12
Focused accessibility and SEO check
Runs only the accessibility and SEO checks for a targeted review.
bricks_analyze_page({
page_id: 33,
checks: ["accessibility", "seo"]
})Common Mistakes
Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 2018
Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48
Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Warning: Undefined array key "fix_description" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 47
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-includes/kses.php on line 2018
Warning: Undefined array key "wrong_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 48
Warning: Undefined array key "right_code" in /var/www/vhosts/mcpbricksbuilder.wecode.swiss/httpdocs/wp-content/themes/bricks/includes/elements/code.php(236) : eval()'d code on line 49
Tips & Warnings
Tip: Run this tool as part of the Phase 5 polish workflow: (1) bricks_auto_responsive, (2) bricks_validate_page, (3) bricks_analyze_page with all checks, (4) bricks_fix_audit_issues for auto-fixable problems.
Tip: Focus on errors first (blocking issues), then warnings (advisory), then info (optimization hints). Errors typically indicate broken functionality while warnings suggest quality improvements.
Warning: Performance checks may flag large element counts. While this is informational, pages with 100+ elements should be reviewed for optimization opportunities.