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
#3051Bulk Page Creator6291710k+Request data is not unslashed
#3052Carousel Slider627130k+Non-prefixed global variable
#3053Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages628110040k+Missing direct file access protection
#3054Custom Permalink Editor624513k+Non-prefixed hook name
#3055DreamHost Automated Migration62152320k+Output is not escaped
#3056exovia GDPR Google Maps624064k+Output is not escaped
#3057Falcon – WordPress Optimizations & Tweaks6247662k+Short PHP open tag found
#3058Import entries for Gravity Forms62626500Input is not validated
#3059Migrate To Liquid Web & Nexcess6215232k+Output is not escaped
#3060Pressable Automated Migration6215233k+Output is not escaped
#3061Proofreading6211745k+Direct Query
#3062Spam Comments Cleaner6214291k+Non-prefixed function
#3063Topic SEO Content Optimization Tool6235151k+curl curl close
#3064Woo Product Remover6223141k+SQL query is not prepared
#3065Embed Videos For Product Image Gallery Using WooCommerce622116400Text Domain Mismatch
#3066WP Category Sort621522500Text Domain Mismatch
#3067XPoster – Share to Bluesky and Mastodon62263610k+Missing nonce verification
#3068Migrate to WordPress.com6215282k+Output is not escaped
#3069Automatic Featured Images from Videos6314137k+Missing direct file access protection
#3070Classic Editor and Classic Widgets63184120k+Nonce verification recommended
#3071Placeholder Image for WooCommerce63315400Output is not escaped
#3072Image Sitemap631114400Output is not escaped
#3073IndexNow Plugin631491100k+error log error log
#3074Missed Scheduled Posts Publisher by WPBeginner63161730k+Text Domain Mismatch
#3075MooWoodle – WordPress Moodle LMS Integration, Sell Moodle Courses via WooCommerce631045800No Caching
#3076Contact Form to Chat Apps | Click to Chat to Order – FormyChat63301343k+Direct Query
#3077Collapsing Archives643693k+date date
#3078CV Demo Importer642195400Non-prefixed global variable
#3079DataFeedWatch Connector for WooCommerce6416112600Non-prefixed hook name
#3080DoFollow Case by Case644601k+Direct Query
#3081ELEX WooCommerce Product Price Custom Text (Before & After Text) and Discount644441372k+Missing Arg Domain
#3082Icon Element – Icon Pack for Elementor Page Builder (6718 icons)64301640k+wp function not compatible with requires wp
#3083Inactive Logout64307110k+Non-prefixed global variable
#3084Inline Related Posts641739100k+Nonce verification recommended
#3085Pageviews6415121k+Missing Translators Comment
#3086Stancer for WooCommerce642108400Non-prefixed global variable
#3087JTL-Connector for WooCommerce6471661k+Direct Query
#3088WP REST API Controller648228k+Nonce verification recommended
#3089WP REST Cache641111310k+Direct Query
#3090WP Term Order642266k+Nonce verification recommended
#3091AdSimple Cookie Consent Banner6555109600wp function not compatible with requires wp
#3092Custom Share Buttons with Floating Sidebar65164204k+Text Domain Mismatch
#3093Cyr to Lat Reloaded – Transliteration of Links and File Names65133630k+Direct Query
#3094Dashboard Directory Size65329400Missing Arg Domain
#3095Email Tracker65254800SQL query is not prepared
#3096Integration for Elementor forms – Sendinblue6594567k+Text Domain Mismatch
#3097Bitrix24652810500Text Domain Mismatch
#3098License For Envato659289k+Non-prefixed global variable
#3099Notibar – Notification Bar for WordPress6543628k+wp function not compatible with requires wp
#3100Royal MCP – Secure AI Connector for Claude, ChatGPT & Gemini656337k+Interpolated SQL is not prepared