WordPress.DB.RestrictedFunctions.mysql_mysqli_error
mysql mysqli error
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 | Updated | Top Issue |
|---|---|---|---|---|---|---|---|
| #1 | Matomo Analytics – Powerful, Privacy-First Insights for WordPress | 19 | 1,909 | 878 | 100k+ | 2026-06-16 | Exception Not Escaped |
| #2 | Duplicator – Backups & Migration Plugin – Cloud Backups, Scheduled Backups, & More | 21 | 2,572 | 1,277 | 1m+ | 2026-05-22 | Output Not Escaped |
| #3 | wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin | 21 | 1,354 | 1,140 | 70k+ | 2026-06-08 | Output Not Escaped |
| #4 | Prime Mover – Migrate WordPress Website & Backups | 22 | 1,326 | 1,600 | 10k+ | 2026-06-06 | Non Prefixed Variable Found |
| #5 | File Manager | 22 | 740 | 520 | 1m+ | 2026-04-21 | Unsafe Printing Function |
| #6 | Softaculous | 23 | 116 | 49 | 10k+ | 2025-08-06 | file system operations fread |
| #7 | WP STAGING – WordPress Backup, Restore & Migration | 23 | 1,414 | 1,327 | 100k+ | 2026-05-22 | Non Prefixed Variable Found |
| #8 | Backuply – Backup, Restore, Migrate and Clone | 24 | 704 | 551 | 700k+ | 2026-05-27 | Non Prefixed Variable Found |
| #9 | UpdraftPlus: WP Backup & Migration Plugin | 24 | 277 | 299 | 3m+ | 2026-06-05 | Non Prefixed Variable Found |
| #10 | PW WooCommerce Bulk Edit | 34 | 219 | 149 | 20k+ | 2026-05-22 | Unsafe Printing Function |