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
#3001XML Feed for Skroutz & BestPrice for WooCommerce571250600Input is not sanitized
#3002BCM Duplicate Menu588114k+Nonce verification recommended
#3003Contact Form DB for Enfold582114700Output is not escaped
#3004Debloat – Remove Unused CSS, Optimize JS58242030k+Nonce verification recommended
#3005Error Log Viewer by BestWebSoft584331726k+Text Domain Mismatch
#3006HAL5810624500Text Domain Mismatch
#3007PW WooCommerce BOGO58308400Unsafe printing function
#3008Videopack582810810k+Input is not sanitized
#3009View Admin As583071359k+Non Singular String Literal Domain
#3010Virtuaria PagBank / PagSeguro for WooCommerce581521k+Non-prefixed global variable
#3011Social Media Auto Poster – Schedule & Publish to Buffer58232117k+Dynamic hook name
#3012Age Gator59915400Direct Query
#3013Co-Authors Plus5927620k+Input is not sanitized
#3014Custom API for WP59173161k+wp function not compatible with requires wp
#3015Display Post Types – Post Grid, post list and post sliders5924147k+Output is not escaped
#3016etracker analytics591691k+Exception output is not escaped
#3017Fathom Analytics Conversions591447400Non-prefixed function
#3018flowpaper59133110k+Non-prefixed function
#3019Pattern Wrangler – Manage Block Patterns and Pattern Categories591473400Non-prefixed global variable
#3020pensopay Payments v259413321k+Non Singular String Literal Domain
#3021UltraPress – AI Assistant, Chatbot & SEO591238800Non-prefixed global variable
#3022Hide Posts5997020k+Direct Query
#3023GST Invoice for WooCommerce5910421k+Missing nonce verification
#3024Variation Swatches for WooCommerce591164300k+Non-prefixed global variable
#3025RevivePress – Keep your Old Content Evergreen5927465k+date date
#3026Accesibilidad Web con el Widget de AccedeMe6022231k+Text Domain Mismatch
#3027Post Blocks & Tools60946400Missing nonce verification
#3028EPROLO-Dropshipping6016341k+Missing nonce verification
#3029Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant601174010k+Non-prefixed global variable
#3030Post Duplicator603324200k+Missing direct file access protection
#3031WPB Popup for Contact Form 7 – Showing Contact Form 7 Popup on Button Click602196k+Output is not escaped
#3032WPSSO Schema Product Metadata for WooCommerce603323500Missing Translators Comment
#3033Academy LMS61185202k+Non-prefixed global variable
#3034CommerceBird – AI Command Center, ERP Integrations & B2B for WooCommerce (Zoho, Exact Online).613162400Direct Query
#3035ELEX WooCommerce Catalog Mode61974910k+Text Domain Mismatch
#3036GetPaid Stripe Payments61206442k+Text Domain Mismatch
#3037Media Library Helper — Bulk edit image ALT, caption & description61167010k+Non-prefixed global variable
#3038Reorder Posts – Quick Post Type and Page Ordering61102310k+Request data is not unslashed
#3039Powerkit – Supercharge your WordPress Site616711510k+Non-prefixed global variable
#3040PW WooCommerce Copy Coupon6115171k+Text Domain Mismatch
#3041SEOPress for MainWP61240106900Text Domain Mismatch
#3042Slider Factory6134142k+Non-prefixed global variable
#3043Show Variations as Single Products for WooCommerce611227500Unsafe printing function
#3044WP Optin Wheel – Gamified Optin Email Marketing Tool for WordPress and WooCommerce6122741k+Non-prefixed global variable
#3045AAM Protected Media Files621310500Direct Query
#3046Add Meta Tag Keywords626151k+Missing nonce verification
#3047Contact Form 7 – Blacklist Unwanted Email621611400Missing direct file access protection
#3048Bulk Page Creator6291710k+Request data is not unslashed
#3049Carousel Slider627130k+Non-prefixed global variable
#3050Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages628110040k+Missing direct file access protection