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
#1701Customize Snapshots43942500Nonce verification recommended
#1702F4 Total Stock Value for WooCommerce4327121k+Output is not escaped
#1703Post title marquee scroll4343251k+Output is not escaped
#1704Qodax Checkout Manager – Checkout Field Editor for WooCommerce431727400Interpolated SQL is not prepared
#1705Secure Passkeys43145831k+Exception output is not escaped
#1706Term Management Tools4392610k+Non-prefixed hook name
#1707Terms Order WP – Categories And Taxonomies Order Plugin431247800Non-prefixed global variable
#1708WP Hotel Booking WPML Support431052400Direct Query
#1709WP Mail Log43402910k+Text Domain Mismatch
#1710Debug Bar Console442391k+Missing Arg Domain
#1711DoLogin Security447447k+Exception output is not escaped
#1712EasyFonts – Host Google Fonts Locally, Fast & Auto-Optimize, GDPR Compliant445701k+Interpolated SQL is not prepared
#1713Github Embed4418351k+Non-prefixed global variable
#1714I Order Terms4440241k+Output is not escaped
#1715Extended Post Status4527271k+Output is not escaped
#1716Inazo's flamingo automatically delete old messages4533204k+Output is not escaped
#1717Super Blank45131569k+Missing direct file access protection
#1718SureDonation – Donation Forms, Fundraising Campaigns & Donor Management4544762k+Missing Arg Domain
#1719Display Featured Image for Genesis4664591k+Non-prefixed global variable
#1720Gravity Forms Constant Contact4636273k+Non-prefixed class
#1721SX User Name Security46429900Output is not escaped
#1722Auto Focus Keyword for SEO4713442k+Interpolated SQL is not prepared
#1723Delete Duplicate Posts4795010k+Direct Query
#1724DPO Pay for WooCommerce4728411k+Non Singular String Literal Text
#1725Log Emails4719296k+Non-prefixed global variable
#1726FlexStock – Product Stock Sync with Google Sheets for WooCommerce475255700Direct Query
#1727Userback4713202k+Output is not escaped
#1728Website Article Monetization By MageNet47172410k+Output is not escaped
#1729FedaPay Gateway for WooCommerce472411700Output is not escaped
#1730WP Prefix Changer472716900Missing Arg Domain
#1731Compress, Resize & Lazy Load Images – WPvivid Image Optimization471075810k+Missing direct file access protection
#1732Comment Notifier481055400Non-prefixed global variable
#1733Legal Pages – Privacy Policy, Terms & Conditions, GDPR, CCPA, and Cookie Notice Generator4843839k+Missing direct file access protection
#1734Easy Updates Manager4813182300k+Non-prefixed global variable
#1735WS Action Scheduler Cleaner4813803k+error log error log
#1736SiteEase Bulk Delete Manager495072600Direct Query
#1737CIO Custom Fields Importer49238400Output is not escaped
#1738Import into Easy Property Listings49335241k+Text Domain Mismatch
#1739Anti-Spam Protection – No API Key, GDPR Friendly4921061k+Direct Query
#1740Plugins Last Updated Column492114600Output is not escaped
#1741ReCrawler4910404k+Direct Query
#1742Search in Place4974573k+wp function not compatible with requires wp
#1743SKT Themes Demo Import492181044k+Text Domain Mismatch
#1744WP Sitemap Page494314200k+Missing Translators Comment
#1745MB Custom Post Types & Custom Taxonomies50615510k+Missing Translators Comment
#1746Theme Demo Import50101955k+Non-prefixed hook name
#1747WPML Multilingual for BuddyPress and BuddyBoss5118216k+SQL query is not prepared
#1748Lite Video Embed513571k+Output is not escaped
#1749OnSale Page for WooCommerce5130442k+Text Domain Mismatch
#1750Popular Brand Icons – Simple Icons5120123k+Output is not escaped