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
#2451Taxonomy Images4938509k+Output is not escaped
#2452Users by Date Registered4913201k+Nonce verification recommended
#2453Was This Helpful?4919281k+Output is not escaped
#2454PDF Invoices & Packing Slips for WooCommerce – Challan49561513k+Non-prefixed global variable
#2455Rede Itaú for WooCommerce — Payment PIX, Credit Card and Debit4951451k+Missing nonce verification
#2456WP Sitemap Page494314200k+Missing Translators Comment
#2457Auto Ping Booster Free501821900Setting is missing a sanitization callback
#2458File Manager50427210k+Missing direct file access protection
#2459Send Emails with Mandrill50361416k+Non-prefixed global variable
#2460Server Info – System Health & Diagnostics Suite5015463k+Input is not sanitized
#2461Simple User Listing502756900Non-prefixed global variable
#2462Table Addons for Elementor50922920k+wp function not compatible with requires wp
#2463Theme Demo Import50101955k+Non-prefixed hook name
#2464BestWebSoft's Twitter50477174900Text Domain Mismatch
#2465WPML Multilingual for BuddyPress and BuddyBoss5118216k+SQL query is not prepared
#2466Counter Box – Add Countdowns, Timers & Dynamic Counters to WordPress5131161k+Missing nonce verification
#2467Firelight Lightbox517897200k+Non-prefixed global variable
#2468Lite Video Embed513571k+Output is not escaped
#2469OnSale Page for WooCommerce5130442k+Text Domain Mismatch
#2470Quotes and Tips by BestWebSoft514851901k+Text Domain Mismatch
#2471SePay Gateway5112392k+Nonce verification recommended
#2472Popular Brand Icons – Simple Icons5120123k+Output is not escaped
#2473Trustpilot Reviews51145230k+Missing nonce verification
#2474User Activity Tracking and Log51282373k+Non-prefixed global variable
#2475Swift SMTP (formerly Welcome Email Editor)5112627k+Missing nonce verification
#2476WP Counter Up – Animated Number Counter & Milestone Showcase51182391k+Non-prefixed global variable
#2477REST API Log5144955k+Non-prefixed hook name
#2478YayMail – WooCommerce Email Customizer5116378850k+Non-prefixed global variable
#2479Fullscreen Galleria523710800Output is not escaped
#2480MB Custom Post Types & Custom Taxonomies5294910k+Nonce verification recommended
#2481Metronet Tag Manager52173620k+Input is not validated
#2482Post Notification by Email5236132k+Output is not escaped
#2483SEOWriting52102430k+Output is not escaped
#2484SKU Generator for WooCommerce5229122k+Output is not escaped
#2485Stealth Publish52722900Missing nonce verification
#2486Notiqoo – Order Notification & Customer Chat for WooCommerce52111871k+Non-prefixed global variable
#2487Wenprise Pinyin Slug5230344k+Text Domain Mismatch
#2488Price Based on Country for WooCommerce524312620k+Non-prefixed hook name
#2489Automattic For Agencies Client5324918420k+Text Domain Mismatch
#2490Connect Contact Form 7 and Mailchimp532365240k+Text Domain Mismatch
#2491Export Custom Pages532219700Output is not escaped
#2492FakerPress536615210k+Non-prefixed global variable
#2493LearnPress – bbPress Integration5319142k+Output is not escaped
#2494Multiple Post Thumbnails53251820k+Output is not escaped
#2495Pinterest for WooCommerce534430300k+Exception output is not escaped
#2496Preserved HTML Editor Markup Plus5312223k+Output is not escaped
#2497Royal WordPress Backup, Restore & Migration Plugin – Backup WordPress Sites Safely53349020k+Database parameter is not escaped
#2498Texty – SMS Notification for WordPress, WooCommerce, Dokan and more5331348k+Output is not escaped
#2499Morning for WooCommerce537591k+Non-prefixed global variable
#2500Cyr-To-Lat541648300k+Dynamic hook name