wp-security
Installation
SKILL.md
WordPress Security Best Practices
OWASP Top 10 for WordPress
1. SQL Injection Prevention
// WRONG - Never do this
$wpdb->query( "SELECT * FROM table WHERE id = " . $_GET['id'] );
// CORRECT - Always use prepare()
$wpdb->get_results( $wpdb->prepare(
"SELECT * FROM {$wpdb->prefix}table WHERE id = %d",
absint( $_GET['id'] )
) );
Related skills