WordPress.DB.RestrictedFunctions.mysql_mysql_get_server_info
mysql mysql get server info
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 | WPPizza – A Restaurant Plugin | 18 | 4,689 | 2,703 | 1k+ | Text Domain Mismatch | ||
| #2 | Event Organiser | 19 | 1,106 | 544 | 20k+ | Text Domain Mismatch | ||
| #3 | Database Access with Adminer | 22 | 983 | 2,553 | 1k+ | Non-prefixed global variable | ||
| #4 | GeoDirectory – WP Business Directory Plugin and Classified Listings Directory | 22 | 4,466 | 3,972 | 10k+ | Output is not escaped | ||
| #5 | WP-WebAuthn | 22 | 957 | 396 | 2k+ | Exception output is not escaped | ||
| #6 | Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe | 23 | 9,310 | 26,642 | 1k+ | Non-prefixed global variable | ||
| #7 | MediaPress | 23 | 904 | 583 | 4k+ | Output is not escaped | ||
| #8 | Softaculous | 23 | 116 | 49 | 10k+ | file system operations fread | ||
| #9 | UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP | 23 | 695 | 2,434 | 20k+ | Non-prefixed hook name | ||
| #10 | Ivory Search – WordPress Search Plugin | 24 | 1,173 | 1,688 | 100k+ | Non-prefixed global variable | ||
| #11 | Hummingbird Performance – Cache & Page Speed Optimization for Core Web Vitals | Critical CSS | Minify CSS | Defer CSS Javascript | CDN | 24 | 3,410 | 866 | 70k+ | Text Domain Mismatch | ||
| #12 | Database Manager – WP Adminer | 24 | 1,005 | 2,752 | 20k+ | Non-prefixed global variable | ||
| #13 | Hardcore Google Fonts Localizer | 25 | 331 | 261 | 900 | Text Domain Mismatch | ||
| #14 | WPvivid — Backup, Migration & Staging | 25 | 899 | 1,461 | 900k+ | Non-prefixed namespace | ||
| #15 | Custom Scrollbar | 27 | 184 | 191 | 2k+ | Output is not escaped | ||
| #16 | Email Marketing Plugin – WP Email Capture | 27 | 383 | 262 | 1k+ | Output is not escaped | ||
| #17 | Advanced Category Excluder | 31 | 349 | 160 | 700 | Output is not escaped | ||
| #18 | Multi Step Form | 34 | 277 | 136 | 9k+ | Output is not escaped | ||
| #19 | Xml Sitemap Generator | 34 | 72 | 47 | 400 | SQL query is not prepared | ||
| #20 | NewsPlugin | 35 | 84 | 53 | 400 | Text Domain Mismatch | ||
| #21 | WP System Information | 35 | 237 | 30 | 800 | Text Domain Mismatch | ||
| #22 | Adaptive Images for WordPress | 37 | 51 | 75 | 3k+ | Output is not escaped | ||
| #23 | TypePad emoji for TinyMCE | 38 | 100 | 24 | 8k+ | Text Domain Mismatch |