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
#2401Taxonomy Images4938509k+Output is not escaped
#2402Users by Date Registered4913201k+Nonce verification recommended
#2403Was This Helpful?4919281k+Output is not escaped
#2404PDF Invoices & Packing Slips for WooCommerce – Challan49561513k+Non-prefixed global variable
#2405Rede Itaú for WooCommerce — Payment PIX, Credit Card and Debit4951451k+Missing nonce verification
#2406WP Sitemap Page494314200k+Missing Translators Comment
#2407Auto Ping Booster Free501821900Setting is missing a sanitization callback
#2408File Manager50427210k+Missing direct file access protection
#2409Send Emails with Mandrill50361416k+Non-prefixed global variable
#2410Server Info – System Health & Diagnostics Suite5015463k+Input is not sanitized
#2411Simple User Listing502756900Non-prefixed global variable
#2412Table Addons for Elementor50922920k+wp function not compatible with requires wp
#2413Theme Demo Import50101955k+Non-prefixed hook name
#2414BestWebSoft's Twitter50477174900Text Domain Mismatch
#2415WPML Multilingual for BuddyPress and BuddyBoss5118216k+SQL query is not prepared
#2416Counter Box – Add Countdowns, Timers & Dynamic Counters to WordPress5131161k+Missing nonce verification
#2417Firelight Lightbox517897200k+Non-prefixed global variable
#2418Lite Video Embed513571k+Output is not escaped
#2419OnSale Page for WooCommerce5130442k+Text Domain Mismatch
#2420Quotes and Tips by BestWebSoft514851901k+Text Domain Mismatch
#2421SePay Gateway5112392k+Nonce verification recommended
#2422Popular Brand Icons – Simple Icons5120123k+Output is not escaped
#2423Trustpilot Reviews51145230k+Missing nonce verification
#2424User Activity Tracking and Log51282373k+Non-prefixed global variable
#2425Swift SMTP (formerly Welcome Email Editor)5112627k+Missing nonce verification
#2426WP Counter Up – Animated Number Counter & Milestone Showcase51182391k+Non-prefixed global variable
#2427REST API Log5144955k+Non-prefixed hook name
#2428YayMail – WooCommerce Email Customizer5116378850k+Non-prefixed global variable
#2429Fullscreen Galleria523710800Output is not escaped
#2430MB Custom Post Types & Custom Taxonomies5294910k+Nonce verification recommended
#2431Metronet Tag Manager52173620k+Input is not validated
#2432Post Notification by Email5236132k+Output is not escaped
#2433SEOWriting52102430k+Output is not escaped
#2434SKU Generator for WooCommerce5229122k+Output is not escaped
#2435Stealth Publish52722900Missing nonce verification
#2436Notiqoo – Order Notification & Customer Chat for WooCommerce52111871k+Non-prefixed global variable
#2437Wenprise Pinyin Slug5230344k+Text Domain Mismatch
#2438Price Based on Country for WooCommerce524312620k+Non-prefixed hook name
#2439Automattic For Agencies Client5324918420k+Text Domain Mismatch
#2440Connect Contact Form 7 and Mailchimp532365240k+Text Domain Mismatch
#2441Export Custom Pages532219700Output is not escaped
#2442FakerPress536615210k+Non-prefixed global variable
#2443LearnPress – bbPress Integration5319142k+Output is not escaped
#2444Multiple Post Thumbnails53251820k+Output is not escaped
#2445Pinterest for WooCommerce534430300k+Exception output is not escaped
#2446Preserved HTML Editor Markup Plus5312223k+Output is not escaped
#2447Royal WordPress Backup, Restore & Migration Plugin – Backup WordPress Sites Safely53349020k+Database parameter is not escaped
#2448Texty – SMS Notification for WordPress, WooCommerce, Dokan and more5331348k+Output is not escaped
#2449Morning for WooCommerce537591k+Non-prefixed global variable
#2450Cyr-To-Lat541648300k+Dynamic hook name