WordPress.DB.PreparedSQL.NotPrepared
SQL query is not prepared
A database query includes dynamic data without using `$wpdb->prepare()` or an equivalent safe pattern.
Why It Shows Up
The scan found a SQL string passed to `$wpdb` where variables appear to be interpolated or concatenated directly.
Why It Matters
Unprepared SQL can allow SQL injection when user-controlled values reach the query.
How to Fix
- Move dynamic values into placeholders such as `%s`, `%d`, `%f`, or `%i` where supported.
- Pass the values as separate arguments to `$wpdb->prepare()`.
- For table names, column names, and sort directions, use strict allowlists instead of raw user input.
References
Affected Plugins
| Rank | Plugin | Score | Errors | Warnings | Installs | Added | Updated | Top Issue |
|---|---|---|---|---|---|---|---|---|
| #1651 | Multiple Featured Images | 40 | 50 | 22 | 5k+ | Output is not escaped | ||
| #1652 | NextGEN Gallery Sidebar Widget | 40 | 59 | 10 | 600 | Output is not escaped | ||
| #1653 | Paystack MemberPress | 40 | 71 | 76 | 400 | Output is not escaped | ||
| #1654 | Requirements Checklist | 40 | 200 | 22 | 900 | Output is not escaped | ||
| #1655 | Private Google Calendars | 40 | 227 | 37 | 1k+ | Output is not escaped | ||
| #1656 | Quiz Cat – WordPress Quiz Plugin | 40 | 151 | 69 | 5k+ | Output is not escaped | ||
| #1657 | Redirector | 40 | 48 | 32 | 7k+ | Output is not escaped | ||
| #1658 | REST API Custom Fields | 40 | 44 | 16 | 800 | Text Domain Mismatch | ||
| #1659 | Role Based Redirect | 40 | 20 | 96 | 2k+ | Non-prefixed global variable | ||
| #1660 | Search Live | 40 | 132 | 71 | 600 | Output is not escaped | ||
| #1661 | Serviceform Pixel | 40 | 18 | 22 | 400 | Output is not escaped | ||
| #1662 | Show Pages URL List | 40 | 29 | 234 | 1k+ | Non-prefixed global variable | ||
| #1663 | Simple Statistics for Feeds | 40 | 64 | 131 | 800 | Nonce verification recommended | ||
| #1664 | Statify Widget | 40 | 52 | 13 | 4k+ | Output is not escaped | ||
| #1665 | StifLi Flex MCP – MCP Server with undo for ChatGPT, Claude & Gemini | 40 | 7 | 111 | 1k+ | Interpolated SQL is not prepared | ||
| #1666 | Timeline History | 40 | 31 | 17 | 500 | Output is not escaped | ||
| #1667 | UTM Leads Tracker – XLPlugins | 40 | 21 | 38 | 400 | Output is not escaped | ||
| #1668 | WC Search Orders By Product | 40 | 47 | 66 | 800 | Nonce verification recommended | ||
| #1669 | Total Sales Counts for WooCommerce | 40 | 121 | 62 | 700 | SQL query is not prepared | ||
| #1670 | Word Balloon | 40 | 20 | 125 | 10k+ | Request data is not unslashed | ||
| #1671 | Media Library Categories | 40 | 29 | 49 | 20k+ | Output is not escaped | ||
| #1672 | WP Reroute Email | 40 | 141 | 106 | 1k+ | Output is not escaped | ||
| #1673 | WPC Smart Price Filter for WooCommerce | 40 | 23 | 62 | 600 | Nonce verification recommended | ||
| #1674 | AMP for WP – Accelerated Mobile Pages | 41 | 656 | 2,401 | 80k+ | Non-prefixed global variable | ||
| #1675 | Antispam | 41 | 11 | 41 | 400 | Missing nonce verification | ||
| #1676 | Auto Focus Keyword for SEO | 41 | 12 | 38 | 2k+ | Input is not validated | ||
| #1677 | Collapsed Archives | 41 | 54 | 4 | 1k+ | Output is not escaped | ||
| #1678 | Custom Post Type Cleanup | 41 | 70 | 12 | 1k+ | Output is not escaped | ||
| #1679 | Duplicate Post Page Menu & Custom Post Type | 41 | 35 | 11 | 10k+ | Text Domain Mismatch | ||
| #1680 | Duplicate Page and Post | 41 | 26 | 21 | 80k+ | Unsafe printing function | ||
| #1681 | SNORDIAN's H5PxAPIkatchu | 41 | 119 | 88 | 500 | SQL query is not prepared | ||
| #1682 | Log cleaner for Solid Security | 41 | 65 | 47 | 8k+ | Text Domain Mismatch | ||
| #1683 | Most Popular Categories | 41 | 67 | 2 | 600 | Output is not escaped | ||
| #1684 | Omnibus — show the lowest price | 41 | 35 | 37 | 10k+ | Output is not escaped | ||
| #1685 | Optimus – WordPress Image Optimizer | 41 | 52 | 20 | 30k+ | Unsafe printing function | ||
| #1686 | Page & Post Notes | 41 | 12 | 77 | 1k+ | Non-prefixed global variable | ||
| #1687 | Plugin Activation Tracker | 41 | 36 | 24 | 1k+ | Text Domain Mismatch | ||
| #1688 | Simple Google Photos Grid | 41 | 48 | 2 | 1k+ | Output is not escaped | ||
| #1689 | Simple Lightbox | 41 | 21 | 48 | 100k+ | Nonce verification recommended | ||
| #1690 | Simple Revision Control | 41 | 34 | 43 | 1k+ | Dynamic hook name | ||
| #1691 | Feedback Company | 41 | 63 | 36 | 800 | Output is not escaped | ||
| #1692 | Threat Scan Plugin | 41 | 29 | 17 | 400 | Output is not escaped | ||
| #1693 | Visibility Logic for Elementor | 41 | 27 | 43 | 30k+ | Output is not escaped | ||
| #1694 | M-Pesa(Kenya) Checkout for Woocommerce | 41 | 46 | 38 | 1k+ | Text Domain Mismatch | ||
| #1695 | WP Lorem ipsum | 41 | 37 | 29 | 500 | Unsafe printing function | ||
| #1696 | WP Media folders | 41 | 19 | 74 | 3k+ | Direct Query | ||
| #1697 | WP Test Email | 41 | 32 | 28 | 20k+ | Unsafe printing function | ||
| #1698 | Contador de Visitas | 42 | 37 | 25 | 500 | SQL query is not prepared | ||
| #1699 | Custom Admin Page by BestWebSoft – Configurable WordPress Dashboard Pages Plugin | 42 | 472 | 181 | 400 | Text Domain Mismatch | ||
| #1700 | Custom Fields for Gutenberg | 42 | 24 | 24 | 1k+ | Output is not escaped |