WordPress.DB.RestrictedFunctions.mysql_mysqli_errno

mysql mysqli errno

The plugin uses a raw MySQL extension or class instead of WordPress database APIs.

medium weight

Why It Shows Up

The scan found `mysql_*`, `mysqli_*`, PDO MySQL, or related database functions in plugin code.

Why It Matters

Bypassing `$wpdb` can ignore WordPress database configuration, escaping conventions, character sets, and compatibility layers.

How to Fix

  • Replace raw MySQL calls with `$wpdb` methods or higher-level WordPress APIs.
  • Use `$wpdb->prepare()` for dynamic values.
  • If a third-party library requires a database connection, isolate it and document why WordPress APIs cannot be used.

Affected Plugins

RankPluginScoreErrorsWarningsInstallsAddedUpdatedTop Issue
#1Matomo Analytics – Powerful, Privacy-First Insights for WordPress191,993892100k+Exception output is not escaped
#2Event Espresso – Event Registration & Ticketing Sales2112,7102,136600Text Domain Mismatch
#3Wordfence Security – Firewall, Malware Scan, and Login Security211,8933,2925m+Output is not escaped
#4WP STAGING – Backups & Restore, Migration & Clone Plugin – Cloud Backups, Scheduled Backups231,5801,786100k+Non-prefixed global variable
#5Softaculous241155010k+file system operations fread
#6Bookit — Booking & Appointment Calendar255701,4934k+Non-prefixed global variable
#7MapSVG – Vector maps, Image maps, Google Maps2692561k+Missing direct file access protection
#8EZ SQL Reports Shortcode Widget and DB Backup27165158500Output is not escaped
#9Query Monitor3144273200k+Non-prefixed class