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
#651Mang Board WP241,2134,7209k+Non-prefixed global variable
#652Admin Tweaks241,507206900Text Domain Mismatch
#653Mass Pages/Posts Creator247361,3641k+Non-prefixed global variable
#654Media Library Folders2488980710k+Text Domain Mismatch
#655Receive customer payments on Woocommerce245491,4191k+Non-prefixed global variable
#656Timetable and Event Schedule by MotoPress2445623230k+Output is not escaped
#657MT Addons for Elementor243,0731,4422k+Text Domain Mismatch
#658Music Player for Elementor – Audio Player & Podcast Player246081,30210k+Non-prefixed global variable
#659MxChat – AI Chatbot & Content Generation for WordPress243,2301,4052k+Text Domain Mismatch
#660My WP Customize Admin/Frontend241,2492928k+Unsafe printing function
#661My Agile Privacy® – CMP, Cookie Consent & Privacy Tools241,1706747k+Text Domain Mismatch
#662New User Approve246521,41520k+Non-prefixed global variable
#663Newsletter – Send awesome emails from WordPress248982,219200k+Non-prefixed global variable
#664Newsletter Subscription Form – User Subscriptions Form, Capture Email243858291k+Non-prefixed global variable
#665Ninja Forms – The Contact Form Builder That Grows With You247491,533600k+Nonce verification recommended
#666NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar2426740440k+Non-prefixed hook name
#667Omnipress24169245800Non-prefixed global variable
#668Opt-Out for Google Analytics (DSGVO / GDPR)242901,9783k+Non-prefixed global variable
#669Overlay Image Divi Module245761,3012k+Non-prefixed global variable
#670Pagar.me para WooCommerce245491165k+Text Domain Mismatch
#671Page Builder: Pagelayer – Drag and Drop website builder24769556400k+Output is not escaped
#672Participants Database249508947k+SQL query is not prepared
#673Paymob for WooCommerce243482885k+Text Domain Mismatch
#674PayPal Brasil para WooCommerce245543291k+Unsafe printing function
#675PDF for Gravity Forms + Drag And Drop Template Builder241,457260400wp function not compatible with requires wp
#676PDF Generator for WordPress Elementor245132711k+Exception output is not escaped
#677PixelYourSite – Your smart PIXEL (TAG) & API Manager241,1762,416500k+Non-prefixed namespace
#678Post Slider and Post Carousel with Post Vertical Scrolling Widget – A Responsive Post Slider245991,53210k+Non-prefixed global variable
#679Product Catalog Simple241,5551,9821k+Output is not escaped
#680Post Affiliate Pro24293335500Nonce verification recommended
#681Premium Blocks – Gutenberg Blocks, Patterns & Templates241403082k+Non-prefixed function
#682Premmerce Brands for WooCommerce247001,3442k+Non-prefixed global variable
#683Premmerce Product Filter for WooCommerce248171,4862k+Non-prefixed global variable
#684Product Editor Pro – WooCommerce Bulk Edit: Prices, Stock, Images, Titles, CSV Import & More242,1544,8331k+Non-prefixed global variable
#685Product Watermark for WooCommerce246854592k+Text Domain Mismatch
#686Products Compare for WooCommerce241,0226951k+Output is not escaped
#687ProfileGrid – User Profiles, Groups and Communities244842,4615k+Non-prefixed global variable
#688Co-Authors, Multiple Authors and Guest Authors in an Author Box with PublishPress Authors2436982020k+Nonce verification recommended
#689PickPlugins Question Answer24321,413400Non-prefixed global variable
#690Quiz and Survey Master (QSM) – Easy Quiz and Survey Maker244052,60640k+Non-prefixed hook name
#691reGenerate Thumbnails Advanced2422012270k+Unsafe printing function
#692Registrations for the Events Calendar – Event Registration Plugin244049447k+Non-prefixed global variable
#693Reviews Feed – Add Testimonials and Customer Reviews From Google Reviews, Yelp, TripAdvisor, and More24146759100k+Non-prefixed global variable
#694PublishPress Revisions: Duplicate Posts, Submit, Approve and Schedule Content Changes2442158310k+Missing Translators Comment
#695RS WP Book Showcase – A Complete Book Catalogue & Library System249103431k+Text Domain Mismatch
#696RSFirewall!245635214k+Output is not escaped
#697RSVP and Event Management243456243k+Direct Query
#698Sailthru for WordPress242392662k+Non-prefixed global variable
#699Screen Reader Accessibility – WCAG, Text-to-Speech & AI Accessibility Fixes24235330600Non-prefixed global variable
#700Security Plugin, Firewall & Malware Scanner with Auto Removal241,18877030k+Output is not escaped