WordPress.DB.RestrictedFunctions.mysql_mysqli_connect_error
mysql mysqli connect 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 | Added | Updated | Top Issue |
|---|---|---|---|---|---|---|---|---|
| #1 | Advanced File Manager – Ultimate File Manager for WordPress And Document Library Solution | 18 | 1,229 | 923 | 100k+ | Exception output is not escaped | ||
| #2 | WPPizza – A Restaurant Plugin | 18 | 4,689 | 2,703 | 1k+ | Text Domain Mismatch | ||
| #3 | Matomo Analytics – Powerful, Privacy-First Insights for WordPress | 19 | 1,993 | 892 | 100k+ | Exception output is not escaped | ||
| #4 | Duplicator – Backups & Migration Plugin – Cloud Backups, Scheduled Backups, & More | 20 | 2,878 | 1,988 | 1m+ | Non-prefixed global variable | ||
| #5 | GoUrl Bitcoin Payment Gateway & Paid Downloads & Membership | 20 | 1,832 | 720 | 700 | Non Singular String Literal Domain | ||
| #6 | Backup Migration | 21 | 999 | 1,081 | 80k+ | Non-prefixed global variable | ||
| #7 | FileOrganizer – WordPress File Manager | 21 | 549 | 261 | 200k+ | unlink unlink | ||
| #8 | WP phpMyAdmin | 21 | 4,528 | 6,435 | 40k+ | Missing Arg Domain | ||
| #9 | wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin | 21 | 1,829 | 1,534 | 60k+ | Output is not escaped | ||
| #10 | File Manager Pro – Filester | 22 | 584 | 411 | 100k+ | Request data is not unslashed | ||
| #11 | File Manager | 22 | 740 | 520 | 1m+ | Unsafe printing function | ||
| #12 | Free 1-Click WordPress Migration | 24 | 259 | 265 | 300 | Direct Query | ||
| #13 | Backuply – Backup, Restore, Migrate and Clone | 24 | 729 | 553 | 600k+ | Non-prefixed global variable | ||
| #14 | Softaculous | 24 | 115 | 50 | 10k+ | file system operations fread | ||
| #15 | EZ SQL Reports Shortcode Widget and DB Backup | 27 | 165 | 158 | 500 | Output is not escaped | ||
| #16 | Graphina – Charts and Graphs For Elementor | 39 | 1,910 | 113 | 10k+ | Text Domain Mismatch |