WordPress.DB.RestrictedFunctions.mysql_mysqli_errno
mysql mysqli errno
The plugin uses a raw MySQL extension or class instead of WordPress database APIs.
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.
References
Affected Plugins
| Rank | Plugin | Score | Errors | Warnings | Installs | Added | Updated | Top Issue |
|---|---|---|---|---|---|---|---|---|
| #1 | Matomo Analytics – Powerful, Privacy-First Insights for WordPress | 19 | 1,919 | 877 | 100k+ | Exception output is not escaped | ||
| #2 | Event Espresso – Event Registration & Ticketing Sales | 20 | 12,698 | 2,135 | 600 | Text Domain Mismatch | ||
| #3 | Wordfence Security – Firewall, Malware Scan, and Login Security | 21 | 1,592 | 2,973 | 5m+ | Output is not escaped | ||
| #4 | MapSVG – Vector maps, Image maps, Google Maps | 22 | 179 | 93 | 1k+ | Missing direct file access protection | ||
| #5 | Prime Mover – Migrate WordPress Website & Backups | 22 | 1,326 | 1,600 | 10k+ | Non-prefixed global variable | ||
| #6 | WP STAGING – WordPress Backups, Restore, Migration & Clone | 23 | 1,525 | 1,610 | 100k+ | Non-prefixed global variable | ||
| #7 | Softaculous | 24 | 115 | 50 | 10k+ | file system operations fread | ||
| #8 | EZ SQL Reports Shortcode Widget and DB Backup | 27 | 165 | 158 | 500 | Output is not escaped | ||
| #9 | Query Monitor | 31 | 44 | 273 | 200k+ | Non-prefixed class |