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.
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.
References
Affected Plugins
| Rank | Plugin | Score | Errors | Warnings | Installs | Added | Updated | Top Issue |
|---|---|---|---|---|---|---|---|---|
| #251 | Fraud Prevention For WooCommerce and EDD | 22 | 572 | 1,394 | 5k+ | Non-prefixed global variable | ||
| #252 | WooCommerce | 22 | 1,359 | 6,172 | 7m+ | Non-prefixed global variable | ||
| #253 | Advanced AJAX Product Filters | 22 | 2,683 | 1,205 | 50k+ | Text Domain Mismatch | ||
| #254 | CoDesigner – All in One Elementor WooCommerce Builder | 22 | 4,131 | 774 | 5k+ | Text Domain Mismatch | ||
| #255 | Simple Shopping Cart | 22 | 796 | 536 | 10k+ | Unsafe printing function | ||
| #256 | WP Affiliate Disclosure | 22 | 1,358 | 1,504 | 1k+ | Non-prefixed global variable | ||
| #257 | Asset CleanUp: Page Speed Booster | 22 | 2,030 | 2,485 | 100k+ | Non-prefixed global variable | ||
| #258 | Master Accordion ( Former WP Awesome FAQ Plugin ) | 22 | 1,774 | 1,286 | 700 | Non-prefixed global variable | ||
| #259 | WP Easy Pay – Payment and Donation form Builder for Square | 22 | 910 | 1,835 | 1k+ | Non-prefixed global variable | ||
| #260 | WP Express Checkout (Fast Payments via PayPal & Stripe) | 22 | 591 | 627 | 1k+ | Output is not escaped | ||
| #261 | File Manager | 22 | 740 | 520 | 1m+ | Unsafe printing function | ||
| #262 | WP Fusion Lite – Marketing Automation and CRM Integration for WordPress | 22 | 275 | 683 | 5k+ | Nonce verification recommended | ||
| #263 | WP Umbrella: Update Backup Restore & Monitoring | 22 | 957 | 966 | 70k+ | Exception output is not escaped | ||
| #264 | SchedulePress – Auto Post & Publish, Auto Social Share, Schedule Posts with Editorial Calendar & Missed Schedule Post Publisher | 22 | 307 | 245 | 10k+ | Output is not escaped | ||
| #265 | NotifSMS – SMS Notifications OTP & 2FA for WordPress & WooCommerce | 22 | 1,353 | 1,412 | 1k+ | Non-prefixed global variable | ||
| #266 | User Frontend: AI Powered Frontend Post Submission, User Directory, User Profile, Membership & User Registration | 22 | 287 | 1,432 | 20k+ | Non-prefixed global variable | ||
| #267 | WP-WebAuthn | 22 | 957 | 396 | 2k+ | Exception output is not escaped | ||
| #268 | WPBITS Addons For Elementor Page Builder | 22 | 996 | 1,399 | 2k+ | Non-prefixed global variable | ||
| #269 | WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell | 22 | 6,004 | 2,764 | 5k+ | Text Domain Mismatch | ||
| #270 | ShopWP | 22 | 430 | 225 | 700 | Text Domain Mismatch | ||
| #271 | WPSSO Core – Complete Schema Markup and Meta Tags | 22 | 1,407 | 412 | 5k+ | Missing Translators Comment | ||
| #272 | WUPO Group Attributes for WooCommerce | 22 | 592 | 1,391 | 400 | Non-prefixed global variable | ||
| #273 | YaySMTP – WP Mail SMTP with Email Logs, Tracking & Reports | 22 | 654 | 435 | 10k+ | Exception output is not escaped | ||
| #274 | YITH WooCommerce Ajax Search | 22 | 408 | 1,659 | 30k+ | Non-prefixed global variable | ||
| #275 | ЮKassa для WooCommerce | 22 | 590 | 168 | 9k+ | Short PHP open tag found | ||
| #276 | Recipe Cards For Your Food Blog from Zip Recipes | 22 | 1,126 | 1,731 | 1k+ | Non-prefixed global variable | ||
| #277 | Print Labels with Barcodes. Create price tags, product labels, order labels for WooCommerce | 23 | 1,185 | 1,027 | 1k+ | Text Domain Mismatch | ||
| #278 | Gutenberg Blocks – ACF Blocks Suite | 23 | 1,097 | 1,449 | 400 | Non-prefixed global variable | ||
| #279 | Advanced Custom Fields: Extended | 23 | 1,885 | 329 | 100k+ | Text Domain Mismatch | ||
| #280 | Frontend Admin by DynamiApps | 23 | 5,938 | 3,208 | 9k+ | Text Domain Mismatch | ||
| #281 | Custom WooCommerce Checkout Fields Editor | 23 | 755 | 1,386 | 2k+ | Non-prefixed global variable | ||
| #282 | Admin and Site Enhancements (ASE) | 23 | 137 | 330 | 200k+ | Nonce verification recommended | ||
| #283 | Advanced Ads – Ad Manager & AdSense | 23 | 559 | 719 | 100k+ | Non-prefixed global variable | ||
| #284 | Advanced Custom Fields (ACF®) | 23 | 2,470 | 1,220 | 2m+ | Text Domain Mismatch | ||
| #285 | Advanced Form Integration — Connect Forms to 200+ Apps | 23 | 5,619 | 4,536 | 10k+ | wp function not compatible with requires wp | ||
| #286 | Advanced Product Labels for WooCommerce | 23 | 921 | 559 | 20k+ | Text Domain Mismatch | ||
| #287 | AI Engine – The Chatbot, AI Framework & MCP for WordPress | 23 | 408 | 539 | 100k+ | error log error log | ||
| #288 | Fullscreen Menu | 23 | 537 | 1,287 | 2k+ | Non-prefixed global variable | ||
| #289 | AR for WordPress | 23 | 151 | 499 | 400 | Non-prefixed global variable | ||
| #290 | Autocomplete Address and Location Picker for WooCommerce | 23 | 630 | 1,299 | 2k+ | Non-prefixed global variable | ||
| #291 | Autoptimize | 23 | 288 | 191 | 800k+ | Output is not escaped | ||
| #292 | Shortcodes and extra features for Phlox theme | 23 | 412 | 424 | 90k+ | Output is not escaped | ||
| #293 | B2BKing — Ultimate WooCommerce B2B and Wholesale Plugin — Wholesale Prices, Bulk Order Form & More | 23 | 1,347 | 409 | 10k+ | Text Domain Mismatch | ||
| #294 | BA Book Everything | 23 | 1,184 | 1,086 | 10k+ | Output is not escaped | ||
| #295 | Kadence Security – Password, Two Factor Authentication, and Brute Force Protection | 23 | 1,053 | 967 | 700k+ | Missing Translators Comment | ||
| #296 | Booking calendar, Appointment Booking System | 23 | 1,079 | 1,125 | 3k+ | Output is not escaped | ||
| #297 | BSK PDF Manager | 23 | 1,576 | 625 | 7k+ | Text Domain Mismatch | ||
| #298 | BuddyDrive | 23 | 722 | 1,597 | 1k+ | Non-prefixed global variable | ||
| #299 | BuddyPress | 23 | 584 | 9,012 | 100k+ | Non-prefixed function | ||
| #300 | Announcement & Notification Banner – Bulletin | 23 | 930 | 1,576 | 2k+ | Non-prefixed global variable |