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
#1601WP Bannerize Pro32281216800Text Domain Mismatch
#1602wp-jalali322196610k+Text Domain Mismatch
#1603WP Popup32539651k+Text Domain Mismatch
#1604SEOPress – AI SEO Plugin & On-site SEO32138429300k+Non-prefixed global variable
#1605WP-Stats322371262k+Output is not escaped
#1606WP Weixin3260152400Non-prefixed constant
#1607WPCasa – Real Estate for WordPress32854291k+Non-prefixed global variable
#1608wpDirAuth32250135500wp function not compatible with requires wp
#1609Privacy Policy Generator – WPLP Legal Pages322640910k+Non-prefixed global variable
#1610WT GeoTargeting3289431k+Output is not escaped
#1611Dynamic XML Sitemaps Generator for Google327441120k+Non-prefixed global variable
#1612YITH Infinite Scrolling323871,41710k+Non-prefixed global variable
#1613YITH WooCommerce Badge Management324131,44610k+Non-prefixed global variable
#1614YITH WooCommerce Compare324221,508100k+Non-prefixed global variable
#1615YITH WooCommerce Quick View323881,42090k+Non-prefixed global variable
#1616Yoo Slider – Image Slider & Video Slider32744209600Output is not escaped
#1617Advanced Forms for ACF331692783k+Non-prefixed hook name
#1618Affiliate Program & Referral Tracking for WooCommerce & WordPress – Affilia3380172500Nonce verification recommended
#1619AI WP Writer – SEO content generator, chatGPT, Gemini335815313k+Text Domain Mismatch
#1620Archive Posts Sort Customize3333897600Output is not escaped
#1621Auto Listings – Car Listings & Car Dealership Plugin for WordPress33803212k+Non-prefixed global variable
#1622Premium Portfolio Features for Phlox theme3320413740k+Output is not escaped
#1623AWeber – Free Sign Up Form and Landing Page Builder Plugin for Lead Generation and Email Newsletter Growth33332299k+Non-prefixed global variable
#1624Bosta WooCommerce33303180700Text Domain Mismatch
#1625Addi – Cuotas que se adaptan a ti331062092k+Direct Query
#1626Nexi XPay334962776k+Text Domain Mismatch
#1627CartPops – High Converting Add To Cart Popup For WooCommerce33631884k+Non-prefixed global variable
#1628Century ToolKit3311878800Output is not escaped
#1629Chartify – WordPress Chart Plugin33764113k+Non-prefixed global variable
#1630ChatHelp – Click to Chat Button, WooCommerce Chat to Order & Floating Chat Form33572041k+Non-prefixed global variable
#1631Clicky Analytics331669210k+Output is not escaped
#1632Companion Auto Update3315929840k+Direct Query
#1633Companion Sitemap Generator – Simple, Smart, and SEO-Ready33118577k+Missing Translators Comment
#1634Contact List – Online Staff Directory & Address Book331183421k+Nonce verification recommended
#1635Chatbot with IBM watsonx Assistant3332483400Non Singular String Literal Domain
#1636Countdown Timer3331117900Text Domain Mismatch
#1637Device Detector33209112600Output is not escaped
#1638Easy Timer33784501k+Non-prefixed global variable
#1639Easy Upload Files During Checkout33218199500Unsafe printing function
#1640EchBay Phonering Alo3374471k+Output is not escaped
#1641FastPixel Cache – Optimize Page Speed: Compress Images, Minify, Clean Database & CDN33513334k+Request data is not unslashed
#1642Gallery Custom Links33646230k+Non Singular String Literal Domain
#1643GDPR Cookie Compliance – Cookie Banner, Cookie Consent, Cookie Notice for CCPA, EU Cookie Law3348370300k+Non-prefixed global variable
#1644GetResponse Forms by Optin Cat33681381k+Missing direct file access protection
#1645Five Star Restaurant Reviews33242142400Output is not escaped
#1646Comments – GraphComment | AI-Moderated Comment System33191177400Unsafe printing function
#1647GSheetConnector for Forminator Forms331282011k+Non-prefixed global variable
#1648Ultimate Addons for Elementor33812912m+Non-prefixed class
#1649HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce3337713920k+Unsafe printing function
#1650Flipbox – Awesomes Flip Boxes Image Overlay334007,27910k+Input is not validated