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
#2901Market Exporter9310201k+Non-prefixed hook name
#2902Version Info – Server Health Monitor, PHP & MySQL Version Display, Environment Indicators931310k+Request data is not unslashed
#2903Serial Numbers – Ultimate License Manager for Selling, Licensing & Securely Delivering Digital Content with WooCommerce9341281k+Direct Query
#2904WooCommerce Analytics932520k+Direct Query
#2905Gravity Forms Zero Spam9449100k+trademarked term
#2906JobBoardWP – Job Board Listings and Submissions9412441k+slow db query meta query
#2907LLMs.txt and LLMs-Full.txt Generator941494k+Non-prefixed global variable
#2908Moving Media Library943272k+Direct Query
#2909Photo Gallery – Image Gallery & Portfolio94361k+Nonce verification recommended
#2910Seamless Sticky Custom Post Types94851k+Missing Arg Domain
#2911Bulk Media Register958358k+Non-prefixed hook name
#2912Statify – Extended Evaluation95211920k+Non-prefixed global variable
#2913Live Chat Plugin for WooCommerce – LiveChat9562101k+Text Domain Mismatch
#2914Manage – Centralized site maintenance and monitoring9554750k+Direct Query
#2915Mystery Themes Demo Importer95767k+Non-prefixed global variable
#2916Pixelavo – Server Side Tracking & Pixel + AI Ads Tools95122k+Direct Query
#2917Simple No Comments95781k+Direct Query
#2918Simple Spoiler95182k+Non-prefixed global variable
#2919LiveChat – Live Chat Plugin for WP Websites9562910k+Text Domain Mismatch
#2920WPGlobus for WPBakery Visual Composer95472k+trademarked term
#2921Yoast Test Helper9524360k+Direct Query
#2922Allow Numeric Slugs9652900Direct Query
#2923Transient Cleaner963641k+Non-prefixed global variable
#2924Bulk Datetime Change963186k+Non-prefixed global variable
#2925Reduce Unused CSS Solution with Critical CSS For WP9648121k+wp function not compatible with requires wp
#2926Delete Post with Attachments962151k+Direct Query
#2927Disable Media Pages9681010k+Missing Translators Comment
#2928Edit Custom Fields9610192k+Direct Query
#2929Fixed Bottom Menu9615455k+Non-prefixed hook name
#2930PayPlus Payment Gateway96871k+Non-prefixed class
#2931Plugins Condition963301k+Non-prefixed global variable
#2932VK Dynamic If Block96863k+date date
#2933Custom Product tabs for WooCommerce9625610k+wp function not compatible with requires wp
#2934Display Eventbrite Events96313k+error log print r
#2935Variation Images Gallery for WooCommerce968710k+Non-prefixed global variable
#2936WP Job Manager – Company Profiles963102k+trademarked term
#2937Base (formerly BaseLinker) – 300+ marketplaces, 150+ carriers & PIM & OMS & WMS in one972164k+Direct Query
#2938Clean Login972136k+Non-prefixed hook name
#2939Disable New User Notification Emails97264k+Non-prefixed hook name
#2940GenerateBlocks9798200k+file system operations is writable
#2941Organize Media Folder973352k+Direct Query
#2942Password bcrypt97412k+Direct Query
#2943Simple Blog Card976183k+Non-prefixed global variable
#2944Simple Content Templates for Blog Posts & Pages97581k+Direct Query
#2945Surfer – WordPress Plugin971256k+Direct Query
#2946SVG Support971271m+Non-prefixed global variable
#2947Remote Website Management by Watchful974124k+Direct Query
#2948WPMR Google Feed Manager for WooCommerce – Sell on Google Merchant Center & Shopping971710k+trademarked term
#2949WP REST Yoast Meta97281k+trademarked term
#2950WPC Product Size Chart for WooCommerce97192k+Non-prefixed class