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
#3401Three Column Screen Layout90581k+Direct Query
#3402WPC Smart Compare for WooCommerce902270k+Nonce verification recommended
#3403WPC Smart Quick View for WooCommerce902590k+Nonce verification recommended
#3404WP BrowserUpdate901171k+Missing Translators Comment
#3405WP Event Manager – Events Calendar, Registrations, Sell Tickets with WooCommerce902020k+Non-prefixed function
#3406WPML to Polylang901456k+Direct Query
#3407LegalBlink for Aruba9133297k+Missing direct file access protection
#3408MultiManager WP – Manage All Your WordPress Sites Easily9128111k+Missing Arg Domain
#3409Sticky Banner91217700Non-prefixed global variable
#3410Viva.com | Smart Checkout for WooCommerce91306k+Direct Query
#3411Min Max Quantities – Set Minimum/Maximum Quantity & Price Limits with Step Control for WooCommerce9123010k+Non-prefixed hook name
#3412Commerce7 for WordPress91293900Non-prefixed global variable
#3413Custom Product Tabs for WooCommerce & WordPress Tabs Builder – Smart Tabs9141210k+Non-prefixed global variable
#3414WP Session Manager915162k+Direct Query
#3415WPC Custom Related Products for WooCommerce91261k+Non-prefixed class
#3416WPSSO Tune WP Image Editors913510900Missing Translators Comment
#3417XPS Ship Integration9158201k+Text Domain Mismatch
#3418Add Code To Head92283k+Non-prefixed global variable
#3419Autoload Optimizer9213500Direct Query
#3420BetterDocs – AI Documentation, Knowledge Base, Docs, Wikis, FAQ with Chatbot9223030k+Non-prefixed global variable
#3421Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager921610k+Direct Query
#3422Fluent Forms Block924182k+Non-prefixed global variable
#3423Hoot Import921101k+Direct Query
#3424PhotoSwipe92491k+Not In Footer
#3425MWW Scheduled Post Trigger924260k+Direct Query
#3426MediaMan – Where is this Image Used?92212500Direct Query
#3427WooCommerce Accommodation Bookings921911k+Non-prefixed global variable
#3428WP Quick Post Duplicator923102k+trademarked term
#3429Advanced Post Block – Showcase Posts with Grid, List, Card Layouts and Filters931810k+Direct Query
#3430Advanced Responsive Video Embedder for Rumble, Odysee, YouTube, Vimeo, Kick …93253220k+Missing direct file access protection
#3431Custom Post Type Sticky93106900Text Domain Mismatch
#3432League Table – WordPress Table Plugin931091k+Missing direct file access protection
#3433Market Exporter9310201k+Non-prefixed hook name
#3434Version Info – Server Health Monitor, PHP & MySQL Version Display, Environment Indicators931310k+Request data is not unslashed
#3435Serial Numbers – Ultimate License Manager for Selling, Licensing & Securely Delivering Digital Content with WooCommerce9341281k+Direct Query
#3436WooCommerce Analytics932520k+Direct Query
#3437Gravity Forms Zero Spam9449100k+trademarked term
#3438JobBoardWP – Job Board Listings and Submissions9412441k+slow db query meta query
#3439LLMs.txt and LLMs-Full.txt Generator941494k+Non-prefixed global variable
#3440LovedByAI – Generative Engine Optimization, AI Search, GEO, AEO9416700Direct Query
#3441Moving Media Library943272k+Direct Query
#3442Seamless Sticky Custom Post Types94851k+Missing Arg Domain
#3443TrueRanker944918400wp function not compatible with requires wp
#3444Shortcode94645500Direct Query
#3445WPBean Form Popup for WPForms and Contact Form 7 – Create Popup Forms Easily9422600Direct Query
#3446Bulk Media Register958358k+Non-prefixed hook name
#3447Statify – Extended Evaluation95211920k+Non-prefixed global variable
#3448Live Chat Plugin for WooCommerce – LiveChat9562101k+Text Domain Mismatch
#3449Manage – Centralized site maintenance and monitoring9554760k+Direct Query
#3450Media from ZIP9516600Non-prefixed global variable