WordPress.DB.PreparedSQLPlaceholders.UnnecessaryPrepare
Unnecessary Prepare
A SQL query is built in a way that Plugin Check cannot verify as safely prepared.
Why It Shows Up
The scan found missing, incorrect, quoted, unsupported, or mismatched SQL placeholders around `$wpdb->prepare()` usage.
Why It Matters
Broken preparation can leave dynamic SQL values unsafe or make queries behave differently than intended.
How to Fix
- Keep placeholders in the SQL string and pass dynamic values as separate arguments.
- Use the placeholder that matches the value type.
- Do not quote placeholders manually, and use allowlists for identifiers or SQL fragments.
References
Affected Plugins
| Rank | Plugin | Score | Errors | Warnings | Installs | Added | Updated | Top Issue |
|---|---|---|---|---|---|---|---|---|
| #51 | CP Blocks | 36 | 46 | 38 | 1k+ | wp function not compatible with requires wp | ||
| #52 | Easy Testimonial Slider and Form | 37 | 14 | 144 | 700 | Request data is not unslashed | ||
| #53 | Phoenix Media Rename | 37 | 180 | 104 | 50k+ | Output is not escaped | ||
| #54 | GoodBarber | 38 | 38 | 73 | 1k+ | Nonce verification recommended | ||
| #55 | Responsive Starter Templates – Elementor Templates & Starter Sites | 38 | 48 | 322 | 10k+ | Non-prefixed global variable | ||
| #56 | Simple Expires | 38 | 32 | 39 | 500 | Non Singular String Literal Domain | ||
| #57 | Social Login | 41 | 8 | 110 | 5k+ | Input is not sanitized | ||
| #58 | VA Simple Expires | 43 | 25 | 31 | 800 | Output is not escaped | ||
| #59 | FlexStock – Product Stock Sync with Google Sheets for WooCommerce | 47 | 5 | 255 | 700 | Direct Query | ||
| #60 | MSN Partner Hub | 54 | 21 | 25 | 1k+ | Missing direct file access protection | ||
| #61 | Hide Title | 68 | 13 | 6 | 900 | Output is not escaped | ||
| #62 | Dual Currency Display | 77 | 1 | 24 | 900 | Direct Query | ||
| #63 | Web3 Crypto Payments by DePay for WooCommerce | 78 | 6 | 101 | 1k+ | Direct Query | ||
| #64 | PDF Generator for WordPress | 83 | 10 | 198 | 1k+ | Non-prefixed global variable |