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 | rtMedia for WordPress, BuddyPress and bbPress | 21 | 363 | 633 | 8k+ | Non-prefixed constant | ||
| #2 | Duplicator – Backups & Migration Plugin – Cloud Backups, Scheduled Backups, & More | 21 | 2,572 | 1,277 | 1m+ | Output is not escaped | ||
| #3 | WP-Lister Lite for eBay | 21 | 6,697 | 5,129 | 2k+ | Output is not escaped | ||
| #4 | ManageWP Worker | 22 | 507 | 565 | 1m+ | Non-prefixed class | ||
| #5 | WP Umbrella: Update Backup Restore & Monitoring | 22 | 915 | 905 | 70k+ | Exception output is not escaped | ||
| #6 | WP-WebAuthn | 22 | 957 | 396 | 2k+ | Exception output is not escaped | ||
| #7 | Softaculous | 23 | 116 | 49 | 10k+ | file system operations fread | ||
| #8 | Clone | 23 | 244 | 262 | 40k+ | Output is not escaped | ||
| #9 | Backuply – Backup, Restore, Migrate and Clone | 24 | 704 | 551 | 700k+ | Non-prefixed global variable | ||
| #10 | InstaWP Connect – 1-click WP Staging & Migration | 24 | 253 | 811 | 40k+ | Non-prefixed global variable | ||
| #11 | Database Manager – WP Adminer | 24 | 1,005 | 2,752 | 20k+ | Non-prefixed global variable | ||
| #12 | SEO Ultimate | 24 | 437 | 269 | 20k+ | Output is not escaped | ||
| #13 | UpdraftPlus: WP Backup & Migration Plugin | 24 | 277 | 299 | 3m+ | Non-prefixed global variable | ||
| #14 | Advanced WordPress Reset – Debug, Recover & Reset WP | 25 | 475 | 464 | 20k+ | Output is not escaped | ||
| #15 | WPvivid Backup for MainWP | 25 | 818 | 1,794 | 10k+ | Missing nonce verification | ||
| #16 | WPvivid — Backup, Migration & Staging | 25 | 899 | 1,461 | 900k+ | Non-prefixed namespace | ||
| #17 | Email Marketing Plugin – WP Email Capture | 27 | 383 | 262 | 1k+ | Output is not escaped | ||
| #18 | DB Cache Reloaded Fix | 29 | 133 | 42 | 2k+ | Output is not escaped |