WordPress.DB.DirectDatabaseQuery.DirectQuery

Direct Query

The plugin runs a direct database query instead of using a higher-level WordPress API or cache-aware pattern.

medium weight

Why It Shows Up

Plugin Check found `$wpdb` access that queries the database directly, changes schema, or bypasses normal caching expectations.

Why It Matters

Direct queries can be correct, but they are easier to make unsafe, slower at scale, and harder for WordPress to cache or filter.

How to Fix

  • Use WordPress APIs such as post, term, metadata, option, or user functions when they fit the task.
  • If direct SQL is necessary, prepare dynamic values and add a clear caching strategy for repeated reads.
  • Keep schema changes in activation or upgrade routines and make them idempotent.

Affected Plugins

RankPluginScoreErrorsWarningsInstallsAddedUpdatedTop Issue
#1151Quick Featured Images3243632350k+Non-prefixed global variable
#1152Relevanssi – A Better Search3286266100k+Missing direct file access protection
#1153Responsive Filterable Portfolio Gallery – Media Grid & Video Portfolio324361631k+Output is not escaped
#1154Restrict Usernames Emails Characters323273671k+Output is not escaped
#1155Revolut Gateway for WooCommerce32851576k+Input is not sanitized
#1156RSS for Yandex Turbo3268730720k+Unsafe printing function
#1157Simple Ajax Chat – Add a Fast, Secure Chat Box321082662k+Output is not escaped
#1158Page Builder by SiteOrigin32224212500k+Output is not escaped
#1159Sky Addons for Elementor32853512k+Non-prefixed namespace
#1160Split Test For Elementor32981323k+Non-prefixed global variable
#1161Stock Sync for WooCommerce323622321k+Text Domain Mismatch
#1162Subscribe2 – Form, Email Subscribers & Newsletters323241010k+Direct Query
#1163Thrive Automator32848410k+SQL query is not prepared
#1164TK Google Fonts GDPR Compliant32582341k+Output is not escaped
#1165Ultimate Store Kit – Addon For WooCommerce, EDD and Elementor32572934k+Post Not In exclude
#1166Unbounce Landing Pages321698610k+Output is not escaped
#1167WebwinkelKeur: Webshop keurmerk & reviews for WordPress32200474k+Short PHP open tag found
#1168BEAR – Bulk Editor and Products Manager Professional for WooCommerce by Pluginus.Net32593340k+Non-prefixed global variable
#1169wp-jalali322196610k+Text Domain Mismatch
#1170SEOPress – AI SEO Plugin & On-site SEO32138429300k+Non-prefixed global variable
#1171WP-Stats322371262k+Output is not escaped
#1172Privacy Policy Generator – WPLP Legal Pages322640910k+Non-prefixed global variable
#1173Dynamic XML Sitemaps Generator for Google327441120k+Non-prefixed global variable
#1174YITH Infinite Scrolling323871,41710k+Non-prefixed global variable
#1175YITH WooCommerce Badge Management324131,44610k+Non-prefixed global variable
#1176YITH WooCommerce Compare324221,508100k+Non-prefixed global variable
#1177YITH WooCommerce Quick View323881,42090k+Non-prefixed global variable
#1178Extra Product Options Builder for WooCommerce331011552k+Non-prefixed hook name
#1179Advanced Forms for ACF331692783k+Non-prefixed hook name
#1180Auto Listings – Car Listings & Car Dealership Plugin for WordPress33803212k+Non-prefixed global variable
#1181Premium Portfolio Features for Phlox theme3320413740k+Output is not escaped
#1182AWeber – Free Sign Up Form and Landing Page Builder Plugin for Lead Generation and Email Newsletter Growth33332299k+Non-prefixed global variable
#1183Nexi XPay334962776k+Text Domain Mismatch
#1184CartPops – High Converting Add To Cart Popup For WooCommerce33631884k+Non-prefixed global variable
#1185Chartify – WordPress Chart Plugin33764113k+Non-prefixed global variable
#1186ChatHelp – Click to Chat Button, WooCommerce Chat to Order & Floating Chat Form33572041k+Non-prefixed global variable
#1187Clicky Analytics331669210k+Output is not escaped
#1188Companion Auto Update3315929850k+Direct Query
#1189Companion Sitemap Generator – Simple, Smart, and SEO-Ready33118577k+Missing Translators Comment
#1190Easy Timer33784501k+Non-prefixed global variable
#1191EchBay Phonering Alo3374471k+Output is not escaped
#1192FastPixel Cache – Optimize Page Speed: Compress Images, Minify, Clean Database & CDN33513334k+Request data is not unslashed
#1193Gallery Custom Links33646230k+Non Singular String Literal Domain
#1194GDPR Cookie Compliance – Cookie Banner, Cookie Consent, Cookie Notice for CCPA, EU Cookie Law3348370300k+Non-prefixed global variable
#1195Flipbox – Awesomes Flip Boxes Image Overlay334007,27910k+Input is not validated
#1196Image Source Control Lite – Show Image Credits and Captions331402213k+Non-prefixed hook name
#1197ImageLinks – Interactive Image Builder with Hotspots33517901k+Text Domain Mismatch
#1198WPZOOM Social Feed Widget & Block3331027860k+Unsafe printing function
#1199Intagrate Lite33941524k+date date
#1200ITRO Popup Plugin335911356k+Output is not escaped