WordPress.DB.PreparedSQL.NotPrepared

SQL query is not prepared

A database query includes dynamic data without using `$wpdb->prepare()` or an equivalent safe pattern.

critical weight

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.

Affected Plugins

RankPluginScoreErrorsWarningsInstallsAddedUpdatedTop Issue
#1651Multiple Featured Images4050225k+Output is not escaped
#1652NextGEN Gallery Sidebar Widget405910600Output is not escaped
#1653Paystack MemberPress407176400Output is not escaped
#1654Requirements Checklist4020022900Output is not escaped
#1655Private Google Calendars40227371k+Output is not escaped
#1656Quiz Cat – WordPress Quiz Plugin40151695k+Output is not escaped
#1657Redirector4048327k+Output is not escaped
#1658REST API Custom Fields404416800Text Domain Mismatch
#1659Role Based Redirect4020962k+Non-prefixed global variable
#1660Search Live4013271600Output is not escaped
#1661Serviceform Pixel401822400Output is not escaped
#1662Show Pages URL List40292341k+Non-prefixed global variable
#1663Simple Statistics for Feeds4064131800Nonce verification recommended
#1664Statify Widget4052134k+Output is not escaped
#1665StifLi Flex MCP – MCP Server with undo for ChatGPT, Claude & Gemini4071111k+Interpolated SQL is not prepared
#1666Timeline History403117500Output is not escaped
#1667UTM Leads Tracker – XLPlugins402138400Output is not escaped
#1668WC Search Orders By Product404766800Nonce verification recommended
#1669Total Sales Counts for WooCommerce4012162700SQL query is not prepared
#1670Word Balloon402012510k+Request data is not unslashed
#1671Media Library Categories40294920k+Output is not escaped
#1672WP Reroute Email401411061k+Output is not escaped
#1673WPC Smart Price Filter for WooCommerce402362600Nonce verification recommended
#1674AMP for WP – Accelerated Mobile Pages416562,40180k+Non-prefixed global variable
#1675Antispam411141400Missing nonce verification
#1676Auto Focus Keyword for SEO4112382k+Input is not validated
#1677Collapsed Archives415441k+Output is not escaped
#1678Custom Post Type Cleanup4170121k+Output is not escaped
#1679Duplicate Post Page Menu & Custom Post Type41351110k+Text Domain Mismatch
#1680Duplicate Page and Post41262180k+Unsafe printing function
#1681SNORDIAN's H5PxAPIkatchu4111988500SQL query is not prepared
#1682Log cleaner for Solid Security4165478k+Text Domain Mismatch
#1683Most Popular Categories41672600Output is not escaped
#1684Omnibus — show the lowest price41353710k+Output is not escaped
#1685Optimus – WordPress Image Optimizer41522030k+Unsafe printing function
#1686Page & Post Notes4112771k+Non-prefixed global variable
#1687Plugin Activation Tracker4136241k+Text Domain Mismatch
#1688Simple Google Photos Grid414821k+Output is not escaped
#1689Simple Lightbox412148100k+Nonce verification recommended
#1690Simple Revision Control4134431k+Dynamic hook name
#1691Feedback Company416336800Output is not escaped
#1692Threat Scan Plugin412917400Output is not escaped
#1693Visibility Logic for Elementor41274330k+Output is not escaped
#1694M-Pesa(Kenya) Checkout for Woocommerce4146381k+Text Domain Mismatch
#1695WP Lorem ipsum413729500Unsafe printing function
#1696WP Media folders4119743k+Direct Query
#1697WP Test Email41322820k+Unsafe printing function
#1698Contador de Visitas423725500SQL query is not prepared
#1699Custom Admin Page by BestWebSoft – Configurable WordPress Dashboard Pages Plugin42472181400Text Domain Mismatch
#1700Custom Fields for Gutenberg4224241k+Output is not escaped