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
#2551WP Accessibility3919910460k+Unsafe printing function
#2552WP Attachments3949443k+Output is not escaped
#2553WPEPP – Essential Security, Password Protect & Login Page Customizer3934293k+Unsupported Identifier Placeholder
#2554WP Limit Login Attempts39266710k+Direct Query
#2555WP Most Popular3950352k+Output is not escaped
#2556WP Server Health Stats39663110k+Output is not escaped
#2557WP Sitemaps Config398837700Output is not escaped
#2558SEO Auto Linker3997623k+Unsafe printing function
#2559Categories to Tags Converter39863850k+Output is not escaped
#2560WPS Limit Login3915276100k+Output is not escaped
#2561YITH Custom Login3986336k+Output is not escaped
#2562Zotpress39804032k+Non-prefixed global variable
#2563404 Notifier403941700Output is not escaped
#2564ACF Theme Code for Advanced Custom Fields404784010k+Output is not escaped
#2565ACF to Custom Database Tables403664600Nonce verification recommended
#2566Add & Replace Affiliate Links for Amazon403952600Output is not escaped
#2567Admin Search4031471k+Output is not escaped
#2568Advanced Admin Search407948600Non Singular String Literal Text
#2569Advanced Country Blocker4023772k+Exception output is not escaped
#2570Advanced IP Blocker4094432k+Exception output is not escaped
#2571Advanced WPLink4067191k+Text Domain Mismatch
#2572AJAX Thumbnail Rebuild40381430k+Unsafe printing function
#2573Allow Multiple Accounts40115199k+Non Singular String Literal Domain
#2574Alt Magic: AI Image Alt Text Generator for WP & Image Rename40551181k+Direct Query
#2575Atomic Edge Security – Firewall, Malware Scan and Login Security4012184600Non-prefixed global variable
#2576Attachment Importer4024763k+Input is not sanitized
#2577Autocomplete Google Address4022672k+Nonce verification recommended
#2578AutoConvert Greeklish Permalinks401161330k+Text Domain Mismatch
#2579AxiaChat AI – Free AI Chatbot (Answers Customers Automatically)4021352k+Interpolated SQL is not prepared
#2580Better Internal Link Search4023481k+strip tags strip tags
#2581Broken Link Notifier40111931k+Non-prefixed global variable
#2582Bubble Menu – Floating Button Menu with Sticky Navigation4022161k+Nonce verification recommended
#2583BuddyPress Profile Completion402830500Output is not escaped
#2584Bulk Delete Comments4016615k+Direct Query
#2585Bulk Move4085449k+Unsafe printing function
#2586Coming soon Page402418500Text Domain Mismatch
#2587Contact Form 7 to Mailjet407039600Output is not escaped
#2588Complete Image Sitemap4055181k+Output is not escaped
#2589Database Addon for Contact Form 7 – CFDB7403556600k+Nonce verification recommended
#2590Copyscape Premium40148133800SQL query is not prepared
#2591Country State City Dropdown CF74035545k+Direct Query
#2592Coupon Generator for WooCommerce40392810k+Unsafe printing function
#2593Cron Logger4049361k+Output is not escaped
#2594Cryptocurrency Widgets Pack4022252700Unsafe printing function
#2595Delete Me40116177k+Output is not escaped
#2596Easy Image Collage4096184k+Unsafe printing function
#2597Enhanced Custom Permalinks4051821k+Nonce verification recommended
#2598Eventer4061551k+Output is not escaped
#2599Expiring Posts405220800Missing Arg Domain
#2600FameTheme Demo Importer4087430k+Nonce verification recommended