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
#251Fraud Prevention For WooCommerce and EDD225721,3945k+Non-prefixed global variable
#252WooCommerce221,3596,1727m+Non-prefixed global variable
#253Advanced AJAX Product Filters222,6831,20550k+Text Domain Mismatch
#254CoDesigner – All in One Elementor WooCommerce Builder224,1317745k+Text Domain Mismatch
#255Simple Shopping Cart2279653610k+Unsafe printing function
#256WP Affiliate Disclosure221,3581,5041k+Non-prefixed global variable
#257Asset CleanUp: Page Speed Booster222,0302,485100k+Non-prefixed global variable
#258Master Accordion ( Former WP Awesome FAQ Plugin )221,7741,286700Non-prefixed global variable
#259WP Easy Pay – Payment and Donation form Builder for Square229101,8351k+Non-prefixed global variable
#260WP Express Checkout (Fast Payments via PayPal & Stripe)225916271k+Output is not escaped
#261File Manager227405201m+Unsafe printing function
#262WP Fusion Lite – Marketing Automation and CRM Integration for WordPress222756835k+Nonce verification recommended
#263WP Umbrella: Update Backup Restore & Monitoring2295796670k+Exception output is not escaped
#264SchedulePress – Auto Post & Publish, Auto Social Share, Schedule Posts with Editorial Calendar & Missed Schedule Post Publisher2230724510k+Output is not escaped
#265NotifSMS – SMS Notifications OTP & 2FA for WordPress & WooCommerce221,3531,4121k+Non-prefixed global variable
#266User Frontend: AI Powered Frontend Post Submission, User Directory, User Profile, Membership & User Registration222871,43220k+Non-prefixed global variable
#267WP-WebAuthn229573962k+Exception output is not escaped
#268WPBITS Addons For Elementor Page Builder229961,3992k+Non-prefixed global variable
#269WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell226,0042,7645k+Text Domain Mismatch
#270ShopWP22430225700Text Domain Mismatch
#271WPSSO Core – Complete Schema Markup and Meta Tags221,4074125k+Missing Translators Comment
#272WUPO Group Attributes for WooCommerce225921,391400Non-prefixed global variable
#273YaySMTP – WP Mail SMTP with Email Logs, Tracking & Reports2265443510k+Exception output is not escaped
#274YITH WooCommerce Ajax Search224081,65930k+Non-prefixed global variable
#275ЮKassa для WooCommerce225901689k+Short PHP open tag found
#276Recipe Cards For Your Food Blog from Zip Recipes221,1261,7311k+Non-prefixed global variable
#277Print Labels with Barcodes. Create price tags, product labels, order labels for WooCommerce231,1851,0271k+Text Domain Mismatch
#278Gutenberg Blocks – ACF Blocks Suite231,0971,449400Non-prefixed global variable
#279Advanced Custom Fields: Extended231,885329100k+Text Domain Mismatch
#280Frontend Admin by DynamiApps235,9383,2089k+Text Domain Mismatch
#281Custom WooCommerce Checkout Fields Editor237551,3862k+Non-prefixed global variable
#282Admin and Site Enhancements (ASE)23137330200k+Nonce verification recommended
#283Advanced Ads – Ad Manager & AdSense23559719100k+Non-prefixed global variable
#284Advanced Custom Fields (ACF®)232,4701,2202m+Text Domain Mismatch
#285Advanced Form Integration — Connect Forms to 200+ Apps235,6194,53610k+wp function not compatible with requires wp
#286Advanced Product Labels for WooCommerce2392155920k+Text Domain Mismatch
#287AI Engine – The Chatbot, AI Framework & MCP for WordPress23408539100k+error log error log
#288Fullscreen Menu235371,2872k+Non-prefixed global variable
#289AR for WordPress23151499400Non-prefixed global variable
#290Autocomplete Address and Location Picker for WooCommerce236301,2992k+Non-prefixed global variable
#291Autoptimize23288191800k+Output is not escaped
#292Shortcodes and extra features for Phlox theme2341242490k+Output is not escaped
#293B2BKing — Ultimate WooCommerce B2B and Wholesale Plugin — Wholesale Prices, Bulk Order Form & More231,34740910k+Text Domain Mismatch
#294BA Book Everything231,1841,08610k+Output is not escaped
#295Kadence Security – Password, Two Factor Authentication, and Brute Force Protection231,053967700k+Missing Translators Comment
#296Booking calendar, Appointment Booking System231,0791,1253k+Output is not escaped
#297BSK PDF Manager231,5766257k+Text Domain Mismatch
#298BuddyDrive237221,5971k+Non-prefixed global variable
#299BuddyPress235849,012100k+Non-prefixed function
#300Announcement & Notification Banner – Bulletin239301,5762k+Non-prefixed global variable