| name | security-audit |
| description | Run comprehensive security audit for the WordPress plugin |
| context | fork |
| agent | Explore |
| allowed-tools | Read, Glob, Grep, Bash(npm run *), Bash(find *), Bash(grep *), Bash(ls *) |
Act as a senior WordPress plugin developer. Review the DesignSetGo WordPress plugin for best practices, security vulnerabilities, and performance optimization opportunities.
Comprehensive Review Areas
1. Security Audit (Critical)
Analyze all PHP and JavaScript files for security vulnerabilities:
PHP Security Issues:
JavaScript Security Issues:
Check these critical files:
includes/admin/class-global-styles.php - REST API endpoints
includes/patterns/class-loader.php - File inclusion
includes/class-assets.php - Asset loading
src/extensions/*/frontend.js - Frontend JavaScript
- Any file with
$_GET, $_POST, $_REQUEST, get_json_params()
2. Performance Analysis
Asset Loading:
Database Performance:
Frontend Performance:
3. WordPress Coding Standards
PHP Standards:
JavaScript Standards:
4. Architecture Review
Code Quality:
WordPress Integration:
Output Requirements
Generate a comprehensive SECURITY-REVIEW.md file containing:
1. Executive Summary
- Overall security status (🔴 Critical, 🟡 High, 🟢 Medium, 🔵 Low)
- Number of issues found by severity
- Quick assessment of production readiness
2. Critical Security Issues (🔴)
For each issue:
- File location with line numbers
- Clear description of the vulnerability
- Attack vector explanation
- Complete code fix with before/after
- Estimated fix time
3. High Priority Issues (🟡)
Same format as critical issues
4. Medium Priority - Performance (🟢)
- Optimization opportunities
- Expected performance gains
- Implementation recommendations
5. Low Priority - Code Quality (🔵)
- Coding standards violations
- Documentation improvements
- Refactoring suggestions
6. Action Plan
Organize issues by priority with time estimates:
- Week 1: Critical security fixes (must do before production)
- Week 2: High priority security & performance
- Week 3: Performance optimization
- Week 4: Code quality & standards
7. Security Checklist for Production
Clear checklist of security requirements before deployment
8. Things Done Well
Positive feedback on good practices to maintain
Execution Steps
-
Review Plugin Structure
- Read main plugin file
- Identify all PHP classes in
includes/
- Identify all JavaScript files in
src/
-
Security Scan
-
Analyze Each Vulnerability
- Read the full context of flagged files
- Determine if vulnerability exists
- Provide specific fix
-
Performance Review
- Check asset loading strategy in
includes/class-assets.php
- Review build output sizes
- Identify optimization opportunities
-
Generate Report
- Create comprehensive markdown document
- Include code examples for all fixes
- Provide actionable recommendations
Additional Checks
Dependency Security
Build Configuration
WordPress.org Readiness
Final Output Format
# DesignSetGo Plugin - Security, Performance & Best Practices Review
**Review Date:** YYYY-MM-DD
**Plugin Version:** X.X.X
**Reviewer:** Senior WordPress Plugin Developer
## Executive Summary
[Status overview]
## 🔴 CRITICAL SECURITY ISSUES
[Numbered issues with fixes]
## 🟡 HIGH PRIORITY ISSUES
[Numbered issues with fixes]
## 🟢 MEDIUM PRIORITY - Performance
[Optimization opportunities]
## 🔵 LOW PRIORITY - Code Quality
[Standards and documentation]
## 📋 ACTION PLAN
[Week-by-week priority order]
## 🔒 Security Checklist for Production
[Pre-deployment checklist]
## ✅ THINGS YOU'RE DOING WELL
[Positive reinforcement]
IMPORTANT:
- Be thorough but constructive
- Provide complete, working code fixes
- Explain WHY each issue matters
- Prioritize by severity and impact
- Include time estimates for fixes
- End with clear next steps