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
#3301Orphans8114350k+Dynamic hook name
#3302Stream8158080k+Direct Query
#3303Team Member Block8115141k+file system operations mkdir
#3304Toggle Content811612700file system operations mkdir
#3305Typing Text811516600file system operations mkdir
#3306VS Event List8112598k+Non-prefixed global variable
#3307ShipStation for WooCommerce813440k+Non-prefixed class
#3308Accordion Toggle8217112k+Non-prefixed class
#3309Bulk Menu Edit8249700Direct Query
#3310ForumWP – Forum & Discussion Board8222444800Non-prefixed global variable
#3311Head & Footer Code82115100k+Non-prefixed constant
#3312Image Gallery Block8213103k+wp function not compatible with requires wp
#3313Infobox8215121k+file system operations mkdir
#3314Lazy Load for Videos826379k+Non-prefixed constant
#3315MyBookTable Bookstore by Stormhill Media8216341k+Direct Query
#3316Parallax Slider Block821512900file system operations mkdir
#3317Posts and Users Stats82183600Non-prefixed global variable
#3318Regenerate Thumbnails821091m+Direct Query
#3319Simple Page Ordering82119100k+Missing Arg Domain
#3320Image Slider Block8213143k+wp function not compatible with requires wp
#3321Testimonial Block821312500wp function not compatible with requires wp
#3322WebP Conversion821333k+Non-prefixed global variable
#3323Easy Booking – WooCommerce Booking & Reservation Plugin8260664k+Non-prefixed global variable
#3324Check Conflicts8336121k+Missing Arg Domain
#3325dLocal Go Payments83915400Missing Translators Comment
#3326Export emails8387500Direct Query
#3327PDF Generator for WordPress83101981k+Non-prefixed global variable
#3328Fixed Widget and Sticky Elements for WordPress8371380k+Non-prefixed global variable
#3329Relevanssi Light83323600Direct Query
#3330Lightweight Sidebar Manager83133680k+Non-prefixed class
#3331WPC AJAX Search for WooCommerce831291k+Nonce verification recommended
#3332Better Post & Filter Widgets for Elementor847273k+slow db query tax query
#3333Wbcom Designs – Birthday Widget for BuddyPress8416313400Text Domain Mismatch
#3334Cachify849369k+Non-prefixed global variable
#3335WP All Import – Import Add-On for ACF8434650k+Non-prefixed global variable
#3336FlippingBook841462k+Missing Translators Comment
#3337JWT Authentication for WP REST API84274160k+wp function not compatible with requires wp
#3338Popup builder with Gamification, Multi-Step Popups, Page-Level Targeting, and WooCommerce Triggers8417370k+Direct Query
#3339Public Post Preview Configurator8414610k+Non Singular String Literal Domain
#3340Timeline Module for Divi8416113k+Text Domain Mismatch
#3341Ultra Addons Lite for Elementor843018700wp function not compatible with requires wp
#3342WPC Grouped Product for WooCommerce84453k+Nonce verification recommended
#3343Attendance Manager859321800date date
#3344Auto Subpage Menu8556800Database parameter is not escaped
#3345GazChap's WooCommerce Auto Category Product Thumbnails85481k+trademarked term
#3346HSTS Ready853113k+Input is not validated
#3347Pronamic Google Maps8524181k+Non-prefixed global variable
#3348Real Thumbnail Generator: Efficient regeneration of thumbnails in all sizes855581k+Non-prefixed constant
#3349Salt Shaker8515136k+Interpolated SQL is not prepared
#3350Save and Continue Link Recovery for Gravity Forms85165400Text Domain Mismatch