WordPress.DB.RestrictedFunctions.mysql_mysqli_close
mysql mysqli close
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 | Administrator Z | 18 | 2,061 | 799 | 400 | 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,900 | 877 | 100k+ | Exception output is not escaped | ||
| #4 | Duplicator – Backups & Migration Plugin – Cloud Backups, Scheduled Backups, & More | 21 | 2,576 | 1,298 | 1m+ | Output is not escaped | ||
| #5 | WP phpMyAdmin | 21 | 4,528 | 6,435 | 40k+ | Missing Arg Domain | ||
| #6 | wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin | 21 | 1,834 | 1,530 | 70k+ | Output is not escaped | ||
| #7 | InfiniteWP Client | 23 | 2,379 | 1,844 | 200k+ | Exception output is not escaped | ||
| #8 | 1-Click Backup Migration | 24 | 162 | 215 | 400 | Direct Query | ||
| #9 | A2 Optimized WP – Turbocharge and secure your WordPress site | 24 | 271 | 231 | 60k+ | Missing Arg Domain | ||
| #10 | Backuply – Backup, Restore, Migrate and Clone | 24 | 711 | 556 | 600k+ | Non-prefixed global variable | ||
| #11 | Screen Reader Accessibility – WCAG, Text-to-Speech & AI Accessibility Fixes | 24 | 235 | 330 | 600 | Non-prefixed global variable | ||
| #12 | Softaculous | 24 | 115 | 50 | 10k+ | file system operations fread | ||
| #13 | WEB-Translation – eTranslation Multilingual | 25 | 217 | 1,057 | 400 | Non-prefixed function | ||
| #14 | TranslatePress – Translate Multilingual sites with AI Translation | 25 | 569 | 1,680 | 400k+ | Non-prefixed hook name | ||
| #15 | Login Security Solution | 27 | 216 | 154 | 4k+ | Output is not escaped | ||
| #16 | WPPerformanceTester | 35 | 94 | 44 | 1k+ | Output is not escaped | ||
| #17 | Search & Replace | 36 | 50 | 53 | 100k+ | Missing nonce verification |