WordPress.DB.RestrictedFunctions.mysql_mysql_query
mysql mysql query
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 | Duplicator – Backups & Migration Plugin – Cloud Backups, Scheduled Backups, & More | 20 | 2,878 | 1,988 | 1m+ | Non-prefixed global variable | ||
| #2 | WP-Lister Lite for eBay | 21 | 6,701 | 5,140 | 2k+ | Output is not escaped | ||
| #3 | Database Access with Adminer | 22 | 983 | 2,553 | 1k+ | Non-prefixed global variable | ||
| #4 | WP Umbrella: Security Backup Restore & Monitoring | 22 | 1,019 | 1,199 | 80k+ | Exception output is not escaped | ||
| #5 | WP-WebAuthn | 22 | 957 | 396 | 2k+ | Exception output is not escaped | ||
| #6 | InstaWP Connect – 1-click WP Staging & Migration | 23 | 252 | 817 | 40k+ | Non-prefixed global variable | ||
| #7 | ManageWP Worker | 23 | 501 | 570 | 1m+ | Non-prefixed class | ||
| #8 | Clone | 23 | 244 | 262 | 40k+ | Output is not escaped | ||
| #9 | Backuply – Backup, Restore, Migrate and Clone | 24 | 729 | 553 | 600k+ | Non-prefixed global variable | ||
| #10 | rtMedia for WordPress, BuddyPress and bbPress | 24 | 293 | 247 | 7k+ | Non-prefixed constant | ||
| #11 | Defender Security – Malware Scanner, Login Security & Firewall | 24 | 1,327 | 1,329 | 80k+ | Non-prefixed namespace | ||
| #12 | Database Manager – WP Adminer | 24 | 1,005 | 2,752 | 20k+ | Non-prefixed global variable | ||
| #13 | SEO Ultimate | 24 | 437 | 269 | 10k+ | Output is not escaped | ||
| #14 | Softaculous | 24 | 115 | 50 | 10k+ | file system operations fread | ||
| #15 | Advanced WordPress Reset – Debug, Recover & Reset WP | 25 | 475 | 464 | 10k+ | Output is not escaped | ||
| #16 | WPvivid Backup for MainWP | 25 | 852 | 1,798 | 10k+ | Missing nonce verification | ||
| #17 | WPvivid — Backup, Migration & Staging | 25 | 1,000 | 1,464 | 900k+ | Non-prefixed namespace | ||
| #18 | Email Marketing Plugin – WP Email Capture | 27 | 383 | 262 | 1k+ | Output is not escaped | ||
| #19 | DB Cache Reloaded Fix | 29 | 133 | 42 | 2k+ | Output is not escaped | ||
| #20 | HTML5 jQuery Audio Player | 32 | 251 | 153 | 1k+ | Unsafe printing function | ||
| #21 | WP-Cleanup | 36 | 79 | 29 | 400 | Output is not escaped |