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
#2651UTM Leads Tracker – XLPlugins402138400Output is not escaped
#2652Visibility Control for LearnDash4055231k+Missing Arg Domain
#2653Visibility Control for LearnPress405219700Missing Arg Domain
#2654WC Search Orders By Product404766800Nonce verification recommended
#2655Payment Gateway – nexi Alpha Bank for WooCommerce4028451k+Missing nonce verification
#2656Total Sales Counts for WooCommerce4012162700SQL query is not prepared
#2657Word Balloon402012510k+Request data is not unslashed
#2658WP Discord Invite407342400Unsafe printing function
#2659WP All Import – Job Listing Import for WP Job Manager4035272k+Output is not escaped
#2660Media Library Categories40294920k+Output is not escaped
#2661WP Multisite Content Copier/Updater4019144800Interpolated SQL is not prepared
#2662WP Reroute Email401411061k+Output is not escaped
#2663WPC Force Sells for WooCommerce403897600Output is not escaped
#2664WPC Smart Price Filter for WooCommerce402362600Nonce verification recommended
#2665WPFront Notification Bar402224450k+Output is not escaped
#2666WPS Menu Exporter40472210k+Output is not escaped
#2667Yektanet Ecommerce40451031k+Request data is not unslashed
#2668My YouTube Channel4054385k+Output is not escaped
#2669Zippy4043319k+Output is not escaped
#2670AMP for WP – Accelerated Mobile Pages416562,40180k+Non-prefixed global variable
#2671Alma – Pay in installments or later for WooCommerce41116681k+Exception output is not escaped
#2672Antispam411141400Missing nonce verification
#2673Authenticator4159441k+Output is not escaped
#2674Auto Focus Keyword for SEO4112382k+Input is not validated
#2675Auto Image Attributes From Filename With Bulk Updater (Add Alt Text, Image Title For Image SEO)4117526100k+Unsafe printing function
#2676Beautiful Cookie Consent Banner41337640k+Non-prefixed global variable
#2677BuddyPress Xprofile Custom Field Types41391894k+Missing nonce verification
#2678Bulk Auto Image Title Attribute (Image Title tag) optimizer (Image SEO)4116371k+Missing nonce verification
#2679Cache control by Cacholong418730500Non Singular String Literal Domain
#2680CMS Tree Page View – Reorder Pages with a Drag-and-Drop Tree411219650k+Unsafe printing function
#2681Collapsed Archives415441k+Output is not escaped
#2682Custom Post Type Cleanup4170121k+Output is not escaped
#2683Database for CF74137322k+Text Domain Mismatch
#2684DevVN Local Store4184281k+Unsafe printing function
#2685Disable Everything41901630k+Output is not escaped
#2686Duplicate Post Page Menu & Custom Post Type41351110k+Text Domain Mismatch
#2687Duplicate Page and Post41262180k+Unsafe printing function
#2688SNORDIAN's H5PxAPIkatchu4111988500SQL query is not prepared
#2689Multiple Themes411124110k+Output is not escaped
#2690Log cleaner for Solid Security4165478k+Text Domain Mismatch
#2691Mobile Contact Bar41943610k+Unsafe printing function
#2692Mollie Forms41145653k+Request data is not unslashed
#2693Most Popular Categories41672600Output is not escaped
#2694Native Emoji4154375k+Unsafe printing function
#2695Social Login4181105k+Input is not sanitized
#2696Omnibus — show the lowest price41353710k+Output is not escaped
#2697Optimus – WordPress Image Optimizer41522030k+Unsafe printing function
#2698OSS Aliyun4119403k+Request data is not unslashed
#2699Page & Post Notes4112771k+Non-prefixed global variable
#2700Plugin Activation Tracker413624900Text Domain Mismatch