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.
Review the specified code or recent changes for quality, security, and standards compliance.
Check PHP code for:
if ( 'value' === $var ))function( $param ))@packageCheck for vulnerabilities:
$_GET, $_POST, $_REQUEST sanitized
sanitize_text_field(), absint(), sanitize_email(), etc.wp_unslash() before sanitizationesc_html(), esc_attr(), esc_url(), wp_kses_post()wp_verify_nonce() or check_ajax_referer()current_user_can() for privileged operations$wpdb->prepare() for queriesCheck adherence to project patterns:
Saman\SEO namespace hierarchyboot() methodsaman_seo_ prefixSAMAN_SEO_ prefix for options_SAMAN_SEO_ prefix for post meta'saman-seo' text domain\Saman\SEO\Helpers\ functions where appropriateadd_submenu_page() or add_menu_page() — only Admin_V2 registers pages. Check for duplicate slug registrations that would break the React SPA.For src-v2/ files:
@wordpress/element for React@wordpress/i18n for translations (__(), _n())@wordpress/api-fetch for API callsFILTERS.mdWP_CLI.mdTEMPLATE_TAGS.md// BAD: Unsanitized input
$title = $_POST['title'];
// GOOD: Sanitized input
$title = isset( $_POST['title'] ) ? sanitize_text_field( wp_unslash( $_POST['title'] ) ) : '';
// BAD: Unescaped output
echo $user_data;
// GOOD: Escaped output
echo esc_html( $user_data );
// BAD: Direct variable in query
$wpdb->query( "SELECT * FROM table WHERE id = $id" );
// GOOD: Prepared statement
$wpdb->query( $wpdb->prepare( "SELECT * FROM table WHERE id = %d", $id ) );
// BAD: No permission check
function delete_item( $id ) {
// Delete directly
}
// GOOD: With permission check
function delete_item( $id ) {
if ( ! current_user_can( 'manage_options' ) ) {
return new WP_Error( 'forbidden', 'Access denied' );
}
// Delete
}
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 - File paths or "recent" to review git changes
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer