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 |
|---|---|---|---|---|---|---|---|---|
| #201 | Modula Image Gallery – Photo Grid & Video Gallery | 22 | 474 | 436 | 100k+ | Text Domain Mismatch | ||
| #202 | Molongui Authorship – Author Boxes, Guest Authors & Co-Authors for WordPress | 22 | 919 | 1,230 | 10k+ | Output is not escaped | ||
| #203 | Motors – Car Dealership & Classified Listings Plugin | 22 | 5,340 | 5,959 | 9k+ | Text Domain Mismatch | ||
| #204 | myCred Addons – Ultimate myCred Modules To Support WordPress Gamification and Loyalty Rewards | 22 | 2,344 | 1,320 | 400 | Output is not escaped | ||
| #205 | Newsletters | 22 | 2,968 | 2,248 | 2k+ | Text Domain Mismatch | ||
| #206 | NinjaFirewall (WP Edition) – Advanced Security Plugin and Firewall | 22 | 1,272 | 2,063 | 100k+ | Non-prefixed global variable | ||
| #207 | NinjaScanner – Virus & Malware scan | 22 | 596 | 551 | 30k+ | Non-prefixed global variable | ||
| #208 | WP OAuth Server (OAuth Authentication) | 22 | 189 | 347 | 3k+ | Non-prefixed function | ||
| #209 | oik | 22 | 489 | 180 | 2k+ | Non Singular String Literal Domain | ||
| #210 | PagBank / PagSeguro Connect para WooCommerce | 22 | 505 | 757 | 4k+ | Non-prefixed global variable | ||
| #211 | PAYCOMET for WooCommerce | 22 | 1,206 | 423 | 2k+ | Text Domain Mismatch | ||
| #212 | PDF Builder for WPForms | 22 | 321 | 266 | 900 | SQL query is not prepared | ||
| #213 | Smart Popup by Supsystic | 22 | 3,172 | 503 | 10k+ | Non Singular String Literal Domain | ||
| #214 | Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App | 22 | 1,581 | 2,326 | 300k+ | Non-prefixed global variable | ||
| #215 | Premium Addons for Elementor – Powerful Elementor Templates & Widgets | 22 | 233 | 1,036 | 700k+ | Non-prefixed hook name | ||
| #216 | Prime Mover – Migrate WordPress Website & Backups | 22 | 1,326 | 1,600 | 10k+ | Non-prefixed global variable | ||
| #217 | Product Catalog Feed by PixelYourSite | 22 | 581 | 357 | 8k+ | Output is not escaped | ||
| #218 | Pronamic Pay | 22 | 258 | 1,077 | 2k+ | Non-prefixed global variable | ||
| #219 | PageSpeed Ninja – Cache, Minify, Defer CSS JavaScript, Critical CSS, Optimize Images, Convert WebP | 22 | 984 | 407 | 5k+ | Unsafe printing function | ||
| #220 | RealPress – Real Estate Plugin | 22 | 604 | 1,167 | 500 | Non-prefixed global variable | ||
| #221 | Restrict User Access – Ultimate Membership & Content Protection | 22 | 977 | 1,840 | 10k+ | Non-prefixed global variable | ||
| #222 | Salon Booking System – Free Version | 22 | 655 | 620 | 2k+ | Missing direct file access protection | ||
| #223 | Social Sharing Plugin – Sassy Social Share | 22 | 1,689 | 233 | 100k+ | wp function not compatible with requires wp | ||
| #224 | Sellsy | 22 | 586 | 490 | 400 | Non Singular String Literal Domain | ||
| #225 | Seraphinite Accelerator | 22 | 594 | 255 | 50k+ | Output is not escaped | ||
| #226 | ShortPixel Image Optimizer – Optimize Images, Convert WebP & AVIF | 22 | 1,044 | 800 | 300k+ | Non-prefixed global variable | ||
| #227 | Simple Job Board | 22 | 634 | 1,355 | 10k+ | Non-prefixed global variable | ||
| #228 | Slick Popup: Contact Form 7 Popup Plugin | 22 | 2,322 | 316 | 2k+ | Text Domain Mismatch | ||
| #229 | Slim Jetpack | 22 | 2,586 | 1,947 | 2k+ | Text Domain Mismatch | ||
| #230 | SNS Count Cache | 22 | 918 | 120 | 8k+ | Non Singular String Literal Domain | ||
| #231 | NextScripts: Social Networks Auto-Poster | 22 | 2,408 | 1,133 | 20k+ | Output is not escaped | ||
| #232 | SSL Zen — SSL Certificate Installer & HTTPS Redirects | 22 | 751 | 1,605 | 10k+ | Non-prefixed global variable | ||
| #233 | Stylish Price List – Price Table Builder & QR Code Restaurant Menu | 22 | 674 | 678 | 3k+ | Output is not escaped | ||
| #234 | SVG Flags – Beautiful Scalable Flags For All Countries! | 22 | 755 | 1,251 | 2k+ | Non-prefixed global variable | ||
| #235 | Swift Performance Lite | 22 | 2,346 | 1,325 | 6k+ | Text Domain Mismatch | ||
| #236 | Tablesome Table – Contact Form DB – WPForms, CF7, Gravity, Forminator, Fluent | 22 | 225 | 519 | 8k+ | error log error log | ||
| #237 | Ultimate Carousel For Divi | 22 | 590 | 1,566 | 800 | Non-prefixed global variable | ||
| #238 | Ultimeter | 22 | 751 | 1,344 | 1k+ | Non-prefixed global variable | ||
| #239 | Uncanny Automator – Easy Automation, Integration, Webhooks & Workflow Builder Plugin | 22 | 522 | 2,367 | 40k+ | Direct Query | ||
| #240 | Uncanny Toolkit for LearnDash | 22 | 539 | 994 | 20k+ | Output is not escaped | ||
| #241 | Unlimited Elements Blocks Library | 22 | 708 | 1,822 | 400 | Non-prefixed global variable | ||
| #242 | RapidLoad AI – Optimize Web Vitals Automatically | 22 | 81 | 840 | 700 | Nonce verification recommended | ||
| #243 | Search & Replace Everything – Quick and Easy Way to Find and Replace Text, Links | 22 | 1,044 | 1,797 | 20k+ | Non-prefixed global variable | ||
| #244 | UpStream: a Project Management Plugin for WordPress | 22 | 683 | 703 | 600 | Non-prefixed global variable | ||
| #245 | Welcart e-Commerce | 22 | 10,378 | 10,931 | 10k+ | Text Domain Mismatch | ||
| #246 | Walker Core | 22 | 1,351 | 1,436 | 700 | Non-prefixed global variable | ||
| #247 | WCFM – Frontend Manager for WooCommerce | 22 | 4,754 | 5,054 | 20k+ | Non-prefixed global variable | ||
| #248 | WCFM Marketplace – Multivendor Marketplace for WooCommerce | 22 | 1,934 | 1,966 | 10k+ | Non-prefixed global variable | ||
| #249 | WCFM Membership – WooCommerce Memberships for Multivendor Marketplace | 22 | 559 | 675 | 10k+ | Non-prefixed global variable | ||
| #250 | Wenprise WeChatPay Payment Gateway For WooCommerce | 22 | 443 | 178 | 400 | Exception output is not escaped |