| name | review-pr |
| description | Review pull request for DesignSetGo WordPress plugin standards |
| context | fork |
| agent | Explore |
| allowed-tools | Read, Glob, Grep, Bash(git *), Bash(npm run *) |
Act as a senior WordPress plugin developer reviewing a pull request for the DesignSetGo WordPress plugin. Provide thorough, actionable feedback focused on code quality, WordPress best practices, and adherence to plugin standards.
Pull Request Review Process
1. Get PR Context
First, fetch PR details using GitHub CLI:
gh pr view [PR_NUMBER] --json title,body,files,additions,deletions,labels,author
gh pr diff [PR_NUMBER]
gh pr checks [PR_NUMBER]
2. Read Changed Files
For each changed file in the PR:
- Read the full file content (not just the diff)
- Understand the context around changes
- Check related files that may be affected
3. DesignSetGo Standards Checklist
Review against .claude/CLAUDE.md standards:
Code Standards
Common Pitfalls (from CLAUDE.md)
Block Development (if block changes)
Safety Rules
4. WordPress Best Practices
Block Standards
Security
Accessibility
Performance
Internationalization
5. Testing Requirements
Verify the PR author has tested:
6. Documentation
7. Commit Quality
Check commit messages follow format:
- Format:
type: description
- Types:
feat, fix, refactor, style, docs, chore
- Examples:
feat(tabs): add keyboard navigation support
fix(stack): correct spacing calculation
refactor: simplify color control logic
docs: update container width documentation
Review Output Format
Generate review feedback in this structure:
# Pull Request Review: [PR Title]
**PR #:** [NUMBER]
**Author:** [@username]
**Branch:** `[branch-name]` → `[target-branch]`
**Status:** [Approve ✅ | Request Changes ❌ | Comment 💬]
## Summary
[Brief overview of what this PR does and your overall assessment]
**Changed Files:** [X] files, [+XXX -XXX] lines
## ✅ What's Good
[Highlight 2-3 things done well]
1. [Specific positive feedback with file reference]
2. [Specific positive feedback with file reference]
## ❌ Issues to Address (Required)
[Only include if there are blocking issues]
### 🔴 Critical (Must Fix)
#### 1. [Issue Title]
**File:** [filename.js:123](path/to/file.js#L123)
**Problem:**
[Clear description of the issue]
**Why this matters:**
[Impact on users/functionality/security]
**Suggested fix:**
```javascript
// Current code (problematic)
[show current code]
// Suggested fix
[show fixed code]
Reference: [Link to relevant doc or standard]
🟡 Important (Should Fix)
[Same format as critical, but for non-blocking issues]
💡 Suggestions (Optional Improvements)
[Nice-to-have improvements that aren't required]
- [Suggestion title] (filename.js:123)
- [Brief description]
- [Optional code example]
📋 Standards Compliance
DesignSetGo Standards
- [✅/❌] Code formatting (4 spaces, proper prefixes)
- [✅/❌] File size under 300 lines
- [✅/❌] Uses WordPress defaults first
- [✅/❌] Color controls using ColorGradientSettingsDropdown
- [✅/❌] Block props using useBlockProps()
- [✅/❌] Styles added to both style.scss and editor.scss
- [✅/❌] No common pitfalls detected
WordPress Best Practices
- [✅/❌] Block registration (block.json)
- [✅/❌] Security (input validation, output escaping)
- [✅/❌] Accessibility (WCAG AA)
- [✅/❌] Internationalization (all strings translatable)
- [✅/❌] Performance (no unnecessary JS/CSS)
Testing
- [✅/❌] Build succeeds
- [✅/❌] Linting passes
- [✅/❌] Editor tested
- [✅/❌] Frontend tested
- [✅/❌] Responsive design tested
- [✅/❌] No console errors
🧪 Testing Checklist for Author
Before merging, ensure:
npm run build
npm run lint:js
npm run lint:css
npm run lint:php
ls -lh build/ | grep -E "\.js$|\.css$"
grep -i "class-name" build/style-index.css
Manual testing:
🔍 Files Reviewed
[List key files reviewed with brief notes]
📚 Related Documentation
[Link to relevant internal docs]
🎯 Next Steps
For PR Author:
- [Specific action item]
- [Specific action item]
- Reply when addressed, and I'll re-review
For Reviewer:
💬 Additional Comments
[Any other feedback, questions, or discussion points]
Review Status: [Approve ✅ | Request Changes ❌ | Comment 💬]
## Execution Steps
1. **Parse user request** - Get PR number or use current branch
2. **Fetch PR details** - Use gh CLI to get files, diff, metadata
3. **Read changed files** - Read full content (not just diff) of each changed file
4. **Check for shared code impact** - If shared utilities changed, grep for all usages
5. **Review against standards** - Check CLAUDE.md standards and common pitfalls
6. **Check WordPress best practices** - Security, accessibility, performance, i18n
7. **Verify testing** - Check if tests exist, build succeeds, linting passes
8. **Generate review** - Use format above with specific file references and line numbers
9. **Prioritize issues** - Critical (blocking) vs Important (should fix) vs Suggestions
## Key Principles
- **Be constructive, not critical** - Frame feedback positively
- **Be specific** - Include file names and line numbers
- **Provide solutions** - Don't just point out problems, show how to fix
- **Explain why** - Help the author understand the reasoning
- **Reference docs** - Link to relevant standards and guides
- **Acknowledge good work** - Highlight what's done well
- **Think production** - Would you be comfortable merging this?
## Important Notes
- **Read full files, not just diffs** - Context matters
- **Test shared code impact** - Use grep to find all usages
- **Check both editor and frontend** - Common pitfall
- **Verify styles in both places** - style.scss AND editor.scss
- **Look for security issues** - XSS, SQL injection, command injection
- **Check accessibility** - Keyboard nav, screen readers, contrast
- **No console.log in production** - Should be removed
- **Deprecations required** - If changing attributes or HTML structure
## Commands to Run
```bash
# Get PR info
gh pr view [NUMBER] --json title,body,files,additions,deletions
gh pr diff [NUMBER]
gh pr checks [NUMBER]
# Check for shared code usage (if utilities changed)
grep -r "ComponentName" src/
# Check style includes
grep -i "block-name" build/style-index.css
grep -i "block-name" build/editor.css
# Verify build and lint
npm run build
npm run lint:js
npm run lint:css
npm run lint:php
# Check file sizes
ls -lh build/ | grep -E "\.js$|\.css$"
Success Criteria
A successful PR review:
- ✅ Identifies all blocking issues
- ✅ Provides specific, actionable fixes
- ✅ Explains why each issue matters
- ✅ References relevant documentation
- ✅ Checks against CLAUDE.md standards
- ✅ Verifies WordPress best practices
- ✅ Confirms testing was done
- ✅ Acknowledges good work
- ✅ Clear next steps for author
Remember: The goal is to help ship high-quality code that follows plugin standards and WordPress best practices.