Get a complete WordPress theme health check in minutes. This comprehensive audit covers everything from security vulnerabilities to accessibility compliance, performance bottlenecks to SEO optimisation - all the quality assurance work that usually takes hours.

Quick Start

Jump straight in with these ready-to-use prompts. Perfect for theme developers, agencies, and anyone responsible for WordPress site quality:

Complete Theme Audit
Use houtini-lm to audit this WordPress theme: C:/themes/my-awesome-theme
Security-Focused Audit
Please run a security audit on this WordPress theme at C:/wp-content/themes/client-theme
Performance & Accessibility Check
Can you check this theme for performance and accessibility issues? C:/themes/my-theme

One Command, Multiple Insights

This function orchestrates multiple analysis steps automatically - structure analysis, security audit, performance check, accessibility review, and code quality assessment all in one go.

What It Does

Think of this as having an entire quality assurance team review your WordPress theme whilst you focus on creative work. audit_wordpress_theme orchestrates a comprehensive multi-step analysis that covers every aspect of theme quality and compliance.

Unlike single-focus tools, this function runs multiple expert analyses in sequence, building a complete picture of your theme's health. It's like having a senior WordPress developer, security expert, accessibility consultant, and performance engineer all review your code simultaneously.

The audit is specifically designed for WordPress themes, understanding the unique requirements of template hierarchy, theme standards, and WordPress coding practices. Whether you're preparing for the WordPress.org repository, client delivery, or your own quality standards, this audit catches issues before they become problems.

Parameters

Customise your audit to focus on what matters most for your project:

Parameter Type Required Default Description
projectPath string Yes -

Path to your WordPress theme directory

Example: "C:/wp-content/themes/my-theme"
auditDepth string No "comprehensive"

Analysis thoroughness: "basic", "detailed", "comprehensive"

Comprehensive is recommended for production themes
auditType string No "full-audit"

Focus area: "security", "performance", "accessibility", "seo", "quality", "full-audit"

Use "full-audit" for complete theme assessment
includeSteps array No ["structure", "security", "performance", "accessibility", "quality", "seo"]

Which analysis steps to include

Customise to focus on specific areas if needed
checkAccessibility boolean No true

Include detailed accessibility compliance audit

Essential for modern WordPress themes
themeType string No "classic"

Theme architecture: "classic", "block", "hybrid"

Affects which standards and features are checked
wpVersion string No "6.4"

Target WordPress version for compatibility

Ensures compliance with specific WordPress standards
phpVersion string No "8.0"

Target PHP version for compatibility checks

Important for hosting compatibility

The audit automatically discovers theme files and runs the appropriate analyses for your theme type and target versions.

Real-World Examples

Here's how to use the audit in different scenarios:

Complete Production Theme Audit

Pre-Launch Quality Check
houtini-lm:audit_wordpress_theme with:
- projectPath: "C:/wp-content/themes/client-business-theme"
- auditDepth: "comprehensive"
- checkAccessibility: true
- themeType: "classic"
- wpVersion: "6.4"

Block Theme Security Audit

Modern Block Theme Check
houtini-lm:audit_wordpress_theme with:
- projectPath: "C:/themes/my-block-theme"
- auditType: "security"
- themeType: "block"
- includeSteps: ["structure", "security", "quality"]

Performance-Focused Audit

Speed Optimisation Review
houtini-lm:audit_wordpress_theme with:
- projectPath: "C:/themes/performance-theme"
- auditType: "performance"
- auditDepth: "comprehensive"
- includeSteps: ["structure", "performance", "quality"]

WordPress.org Repository Preparation

Repository Compliance Check
houtini-lm:audit_wordpress_theme with:
- projectPath: "C:/themes/repo-submission-theme"
- auditDepth: "comprehensive"
- checkAccessibility: true
- themeType: "classic"
- wpVersion: "6.4"
- phpVersion: "7.4"

What Gets Audited

The comprehensive audit covers six critical areas of theme quality:

🏗️ Structure Analysis

  • Template Hierarchy - Proper file structure and naming conventions
  • Required Files - style.css, index.php, functions.php compliance
  • Theme Standards - WordPress coding standards adherence
  • File Organization - Logical structure and maintainability
  • Theme Header - Proper theme information and metadata

🔒 Security Audit

  • Input Sanitization - User input handling and validation
  • Output Escaping - XSS prevention and data security
  • Nonce Verification - CSRF protection implementation
  • Capability Checks - User permission validation
  • Database Queries - SQL injection prevention
  • File Upload Security - Safe file handling practices

⚡ Performance Assessment

  • Asset Loading - CSS and JavaScript optimisation
  • Database Queries - N+1 query detection and optimisation
  • Caching Compatibility - Cache-friendly code patterns
  • Image Handling - Responsive images and lazy loading
  • Resource Minification - Asset optimisation opportunities

♿ Accessibility Compliance

  • WCAG Guidelines - Web accessibility standards compliance
  • Keyboard Navigation - Full keyboard accessibility
  • Screen Reader Support - ARIA labels and semantic HTML
  • Colour Contrast - Visual accessibility standards
  • Focus Management - Proper focus indicators and flow

📊 SEO Optimization

  • Meta Tags - Proper SEO meta implementation
  • Structured Data - Schema.org markup support
  • Page Speed - Performance factors affecting SEO
  • Mobile Responsiveness - Mobile-first design compliance
  • URL Structure - SEO-friendly permalink support

🎯 Code Quality

  • Coding Standards - WordPress PHP coding standards
  • Code Organization - Maintainable and readable code
  • Error Handling - Proper error management
  • Documentation - Code comments and inline documentation
  • Best Practices - Modern WordPress development patterns

What You Get Back

The audit delivers a comprehensive report that helps you improve your theme systematically:

📋 Executive Summary

A high-level overview perfect for clients, stakeholders, or your own planning. Includes overall theme health score, critical issues count, and priority recommendations.

🔍 Detailed Findings by Category

Each audit area gets its own detailed section:

  • Issue identification with severity ratings
  • Specific file locations and line numbers
  • Code examples showing problems and solutions
  • Impact assessment - what each issue means for users

🎯 Actionable Recommendations

  • Prioritised action items - what to fix first
  • Step-by-step solutions with code examples
  • Best practice guidance to prevent future issues
  • Resource links for further learning

✅ Compliance Checklists

  • WordPress.org requirements - repository submission readiness
  • Accessibility standards - WCAG compliance status
  • Security standards - vulnerability protection status
  • Performance benchmarks - optimisation opportunities

📈 Quality Metrics

  • Security score with risk assessment
  • Performance rating and improvement potential
  • Accessibility compliance percentage
  • Code quality maintainability score

Professional Audit Report

The report is structured for both technical teams and stakeholders, with executive summaries alongside detailed technical recommendations. Perfect for client presentations or internal quality reviews.

Perfect Use Cases

Here's when this comprehensive audit becomes absolutely invaluable:

🚀 Pre-Launch Quality Assurance

Before going live with any WordPress theme, run this audit to catch issues that could affect user experience, security, or SEO performance. It's your safety net before launch.

📝 WordPress.org Repository Submission

Preparing a theme for the WordPress repository? This audit checks compliance with WordPress standards, accessibility requirements, and security practices that reviewers examine.

🏢 Client Delivery & Handover

Deliver professional audit reports alongside your themes. Show clients the quality and attention to detail that went into their project, and provide them with ongoing maintenance guidance.

🔄 Legacy Theme Modernisation

Inherited an older theme that needs updating? The audit identifies outdated patterns, security issues, and opportunities to modernise the codebase systematically.

🎯 Performance Optimisation Projects

When site speed matters, use the performance-focused audit to identify bottlenecks in theme code, asset loading, and database queries that impact loading times.

♿ Accessibility Compliance

Meeting accessibility requirements for government, education, or inclusive design projects? The detailed accessibility audit ensures WCAG compliance and identifies specific improvements needed.

🔍 Competitive Analysis

Analyse themes from competitors or the marketplace to understand quality standards, identify common patterns, and benchmark your own work against industry practices.

📚 Team Training & Standards

Use audit results to train junior developers, establish coding standards, and create quality checklists for consistent theme development across your team.

Best Practices

Get the most value from your theme audits with these professional approaches:

🎯 Choose the Right Audit Type

  • "full-audit" - Use for production themes and complete quality assessment
  • "security" - Focus when handling sensitive data or user information
  • "performance" - When site speed is critical for business goals
  • "accessibility" - For compliance requirements or inclusive design

📊 Specify Your Target Environment

Always include version information for accurate compatibility checking:

  • Set wpVersion to your target WordPress version
  • Specify phpVersion for hosting compatibility
  • Choose correct themeType for appropriate standards

🔄 Make It Part of Your Workflow

  • Development phase - Run focused audits on specific areas
  • Pre-launch - Complete comprehensive audit
  • Post-launch - Periodic security and performance checks
  • Updates - Audit after significant changes or WordPress updates

📝 Document and Track Progress

  • Save audit reports for compliance documentation
  • Track improvements between audits
  • Use findings to create team development standards
  • Share relevant sections with stakeholders

🎨 Theme Type Considerations

  • Classic themes - Focus on template hierarchy and PHP code quality
  • Block themes - Emphasise block patterns and theme.json compliance
  • Hybrid themes - Ensure compatibility with both classic and block features

Performance Consideration

Comprehensive audits analyse many files and can take several minutes for large themes. For quick checks during development, use focused audit types or reduce the audit depth.

Troubleshooting

Common issues and their solutions:

Audit takes too long or times out

The comprehensive audit is analysing many files and taking longer than expected.

  • Try auditDepth: "basic" first for large themes
  • Use focused audit types like "security" or "performance" instead of "full-audit"
  • Reduce includeSteps to specific areas you need
  • Ensure your LM Studio model has sufficient memory allocated
Theme directory not recognised or path errors

The audit can't find or access your theme directory.

  • Use absolute paths: C:/wp-content/themes/my-theme
  • Ensure the path contains standard theme files (style.css, index.php)
  • Check that the directory is within your LLM_MCP_ALLOWED_DIRS
  • Verify you have read permissions on all theme files
Missing block theme or accessibility insights

Not getting specific recommendations for your theme type or accessibility requirements.

  • Set themeType to "block" for block themes or "hybrid" for mixed themes
  • Ensure checkAccessibility: true for detailed accessibility audit
  • Use auditDepth: "comprehensive" for the most detailed insights
  • Include "accessibility" in the includeSteps array
Audit results seem generic or miss theme-specific issues

The audit isn't providing WordPress-specific or detailed theme insights.

  • Ensure you're using a model with 13B+ parameters in LM Studio
  • Specify accurate wpVersion and phpVersion for your environment
  • Use "comprehensive" audit depth for detailed analysis
  • Make sure your theme follows standard WordPress theme structure
Performance or memory issues during audit

The audit process is consuming too much memory or affecting system performance.

  • Close unnecessary applications before running comprehensive audits
  • Use maxDepth: 3 to limit directory traversal depth
  • Run focused audits during development, comprehensive audits for final checks
  • Consider upgrading LM Studio model memory allocation