WordPress.DB.PreparedSQL.InterpolatedNotPrepared

Interpolated SQL is not prepared

Variables are interpolated into a SQL string before the query is prepared.

critical weight

Why It Shows Up

The scan found dynamic values placed directly inside SQL, often through string interpolation, before `$wpdb->prepare()` can safely bind them.

Why It Matters

Preparing a query after unsafe interpolation does not reliably protect the dynamic value.

How to Fix

  • Replace interpolated variables with placeholders.
  • Pass each dynamic value as a separate `$wpdb->prepare()` argument.
  • Use allowlists for SQL identifiers and directions that cannot be represented as normal values.

Affected Plugins

RankPluginScoreErrorsWarningsInstallsAddedUpdatedTop Issue
#1051Advanced Appointment Booking & Scheduling8311133k+Text Domain Mismatch
#1052Username Changer84371340k+wp function not compatible with requires wp
#1053Salt Shaker8515136k+Interpolated SQL is not prepared
#1054Notifima – WooCommerce Stock Manager, Inventory Management, Waitlist85130403k+Text Domain Mismatch
#1055Counters Block – Animated Number Counters, Stats & Dynamic KPIs865143k+Missing direct file access protection
#1056ParcelWILL (Formerly ParcelPanel) – Shipment Tracking, Tracking & Order Tracking for WooCommerce876818k+Non-prefixed global variable
#1057Skydropx88491k+Non-prefixed global variable
#1058Ukr-To-Lat883136k+Direct Query
#1059Taxonomy Metadata89494k+Direct Query
#1060WP-Memory-Usage894910k+Interpolated SQL is not prepared
#1061HivePress Reviews905117k+Non-prefixed global variable
#1062Outrank90141k+Database parameter is not escaped
#1063Seamless Sticky Custom Post Types94851k+Missing Arg Domain