| name | review-code |
| description | Review code changes in the Saman SEO plugin for quality, security, and adherence to WordPress coding standards. Use when reviewing PRs, checking code quality, or before committing changes. |
| context | fork |
| agent | Explore |
Code Review for Saman SEO
Review the specified code or recent changes for quality, security, and standards compliance.
Review Checklist
1. WordPress Coding Standards (WPCS)
Check PHP code for:
2. Security Review
Check for vulnerabilities:
3. Saman SEO Patterns
Check adherence to project patterns:
4. JavaScript/React Standards
For src-v2/ files:
5. Performance
6. Documentation
Review Process
- Read the changes - Understand what was modified
- Check each file against the checklist above
- Test mentally - Consider edge cases
- Security scan - Look for common vulnerabilities
- Summarize findings with specific line references
Common Issues to Flag
Security Issues (Critical)
$title = $_POST['title'];
$title = isset( $_POST['title'] ) ? sanitize_text_field( wp_unslash( $_POST['title'] ) ) : '';
Escaping Issues
echo $user_data;
echo esc_html( $user_data );
SQL Injection Risk
$wpdb->query( "SELECT * FROM table WHERE id = $id" );
$wpdb->query( $wpdb->prepare( "SELECT * FROM table WHERE id = %d", $id ) );
Missing Capability Check
function delete_item( $id ) {
}
function delete_item( $id ) {
if ( ! current_user_can( 'manage_options' ) ) {
return new WP_Error( 'forbidden', 'Access denied' );
}
}
Output Format
Provide review in this format:
## Code Review Summary
**Files Reviewed:** [list files]
**Overall Assessment:** [PASS/NEEDS CHANGES/CRITICAL ISSUES]
### Issues Found
#### Critical (Must Fix)
- [file:line] Description of security/critical issue
#### Important (Should Fix)
- [file:line] Description of standards violation
#### Minor (Nice to Have)
- [file:line] Description of style/preference issue
### Positive Notes
- What was done well
### Recommendations
- Suggested improvements
Arguments
$ARGUMENTS - File paths or "recent" to review git changes