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
#1851Flipbox897122k+file system operations mkdir
#1852Countdown Block90784k+file system operations mkdir
#1853Disable Revisions90551k+Direct Query
#1854Featured Image Admin Thumb9071020k+Non-prefixed hook name
#1855HivePress Messages907107k+Direct Query
#1856Progress Bars90812500file system operations mkdir
#1857Image Slider Block907103k+Non-prefixed class
#1858Team Member Block908121k+file system operations mkdir
#1859Testimonial Block90711500file system operations mkdir
#1860Infobox918101k+file system operations mkdir
#1861WPSSO Tune WP Image Editors913510800Missing Translators Comment
#1862MWW Scheduled Post Trigger924260k+Direct Query
#1863MediaMan – Where is this Image Used?92212500Direct Query