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
#1801Missed Schedule Post Publisher6711106k+Output is not escaped
#1802Multilingual Forms for Fluent Forms with WPML6752161k+Text Domain Mismatch
#1803WebToffee WooCommerce Product Feeds – Google Shopping, Pinterest, TikTok Ads, & More671782,8942k+Non-prefixed hook name
#1804Member Swipe for BuddyPress68913500Missing direct file access protection
#1805Collapsing Categories682984k+Missing direct file access protection
#1806Export media with selected content (by DKZR)68101440k+Direct Query
#1807Free Assets Library – Openverse/Pixabay 600+ Million Images6844364k+Text Domain Mismatch
#1808Hreflang Manager – Hreflang Implementation for International SEO6821158k+wp function not compatible with requires wp
#1809News Magazine X Core6863305k+Missing Translators Comment
#1810Thank You Page for WooCommerce6862710k+Non-prefixed global variable
#1811WP Sanitize Accented Uploads681516800Quoted Simple Placeholder
#1812Search by SKU for Woocommerce69131010k+Direct Query
#1813Portfolio Post Type7071140k+Nonce verification recommended
#1814Search and Replace707910k+Input is not sanitized
#1815Simple Login Captcha70201910k+date date
#1816Export Users With Meta7013132k+Direct Query
#1817Starter Templates & Sites Pack by ThemeGrill72285170k+Non-prefixed hook name
#1818Permalinks Moved Permanently7377700Database parameter is not escaped
#1819Speed Optimizer – The All-In-One Performance-Boosting Plugin7316141m+SQL query is not prepared
#1820Comment Edit Core – Simple Comment Editing7327852k+Non-prefixed hook name
#1821Autoload Optimizer74417600Direct Query
#1822Bing URL Submissions Plugin74103840k+error log error log
#1823Duplicate Taxonomy Term74952k+Nonce verification recommended
#1824Clear Cache Everywhere75720800Non-prefixed hook name
#1825Cognito Forms751342k+wp function not compatible with requires wp
#1826WPSSO WP Sitemaps XML with News, Image, and Video Sitemap756024400Missing Translators Comment
#1827Addonify – WooCommerce Wishlist7630431k+Non-prefixed global variable
#1828FileBird Document Library7623135k+Text Domain Mismatch
#1829Category Order and Taxonomy Terms Order764110500k+wp function not compatible with requires wp
#1830UTM Event Tracker and Analytics, UTM Grabber76219900Interpolated SQL is not prepared
#1831Posts List7711157k+Non-prefixed hook name
#1832Recent Posts7872400Database parameter is not escaped
#1833Record of Consent Extension for Complianz78412600Direct Query
#1834Bulk Datetime Change797226k+Non-prefixed global variable
#1835WP Social Ninja – Embed Social Feeds, User Reviews & Chat Widgets79272130k+Missing direct file access protection
#1836Media Library File Size803156k+Nonce verification recommended
#1837Table Of Contents Block808710k+file system operations mkdir
#1838MH Free Gifts for WooCommerce8159300Database parameter is not escaped
#1839Price Table Block811516800file system operations mkdir
#1840Toggle Content811612700file system operations mkdir
#1841Typing Text811516500file system operations mkdir
#1842Accordion Toggle8217112k+Non-prefixed class
#1843Parallax Slider Block821512900file system operations mkdir
#1844Floating Button – Easily Create Sticky, Fixed & Floating Buttons8461844k+Non-prefixed global variable
#1845Image Gallery Block847103k+file system operations mkdir
#1846Auto Subpage Menu8556700Database parameter is not escaped
#1847GazChap's WooCommerce Auto Category Product Thumbnails85481k+trademarked term
#1848Vanilla PDF Embed85833k+parse url parse url
#1849Booktics – Appointment Booking Calendar for Service Businesses86328700wp function not compatible with requires wp
#1850WP Missed Schedule Posts877910k+trademarked term