WordPress.DB.DirectDatabaseQuery.NoCaching
No Caching
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 |
|---|---|---|---|---|---|---|---|---|
| #3401 | WPGlobus for WPBakery Visual Composer | 95 | 4 | 7 | 2k+ | trademarked term | ||
| #3402 | Yoast Test Helper | 95 | 2 | 43 | 60k+ | Direct Query | ||
| #3403 | Allow Numeric Slugs | 96 | 5 | 2 | 900 | Direct Query | ||
| #3404 | Transient Cleaner | 96 | 3 | 64 | 1k+ | Non-prefixed global variable | ||
| #3405 | BetterDocs – AI Documentation, Knowledge Base, Docs, Wikis, FAQ with Chatbot | 96 | 2 | 27 | 30k+ | Non-prefixed global variable | ||
| #3406 | Bulk Datetime Change | 96 | 3 | 18 | 6k+ | Non-prefixed global variable | ||
| #3407 | Reduce Unused CSS Solution with Critical CSS For WP | 96 | 48 | 12 | 1k+ | wp function not compatible with requires wp | ||
| #3408 | Delete Post with Attachments | 96 | 2 | 15 | 1k+ | Direct Query | ||
| #3409 | Disable Media Pages | 96 | 8 | 10 | 10k+ | Missing Translators Comment | ||
| #3410 | Edit Custom Fields | 96 | 10 | 19 | 2k+ | Direct Query | ||
| #3411 | Fixed Bottom Menu | 96 | 15 | 45 | 5k+ | Non-prefixed hook name | ||
| #3412 | PayPlus Payment Gateway | 96 | 87 | 1k+ | Non-prefixed class | |||
| #3413 | Plugins Condition | 96 | 3 | 30 | 1k+ | Non-prefixed global variable | ||
| #3414 | PrettyLinks – Affiliate Link Management, URL Shortener, Link Cloaking, Tracking & Branded Short Links | 96 | 1 | 4 | 200k+ | Database parameter is not escaped | ||
| #3415 | VK Dynamic If Block | 96 | 8 | 6 | 3k+ | date date | ||
| #3416 | Custom Product tabs for WooCommerce | 96 | 25 | 6 | 10k+ | wp function not compatible with requires wp | ||
| #3417 | Display Eventbrite Events | 96 | 31 | 3k+ | error log print r | |||
| #3418 | Variation Images Gallery for WooCommerce | 96 | 87 | 10k+ | Non-prefixed global variable | |||
| #3419 | WP Job Manager – Company Profiles | 96 | 3 | 10 | 2k+ | trademarked term | ||
| #3420 | Base (formerly BaseLinker) – 300+ marketplaces, 150+ carriers & PIM & OMS & WMS in one | 97 | 2 | 16 | 4k+ | Direct Query | ||
| #3421 | Disable New User Notification Emails | 97 | 2 | 6 | 4k+ | Non-prefixed hook name | ||
| #3422 | Exif Caption | 97 | 3 | 25 | 600 | Non-prefixed global variable | ||
| #3423 | GenerateBlocks | 97 | 9 | 8 | 200k+ | file system operations is writable | ||
| #3424 | Geo to Lat | 97 | 3 | 11 | 500 | Direct Query | ||
| #3425 | Reviewkit – Trustpilot Reviews Widget & Embed | 97 | 3 | 28 | 700 | Non-prefixed global variable | ||
| #3426 | Organize Media Folder | 97 | 3 | 35 | 2k+ | Direct Query | ||
| #3427 | Page Management Dropdown | 97 | 3 | 3 | 600 | Direct Query | ||
| #3428 | Quform WPML | 97 | 2 | 8 | 700 | trademarked term | ||
| #3429 | Simple Blog Card | 97 | 6 | 18 | 3k+ | Non-prefixed global variable | ||
| #3430 | Simple Content Templates for Blog Posts & Pages | 97 | 5 | 8 | 1k+ | Direct Query | ||
| #3431 | Surfer – WordPress Plugin | 97 | 1 | 25 | 6k+ | Direct Query | ||
| #3432 | SVG Support | 97 | 1 | 27 | 1m+ | Non-prefixed global variable | ||
| #3433 | Remote Website Management by Watchful | 97 | 4 | 12 | 3k+ | Direct Query | ||
| #3434 | WPMR Google Feed Manager for WooCommerce – Sell on Google Merchant Center & Shopping | 97 | 1 | 7 | 10k+ | trademarked term | ||
| #3435 | WP REST Yoast Meta | 97 | 2 | 8 | 1k+ | trademarked term | ||
| #3436 | WPC Product Size Chart for WooCommerce | 97 | 19 | 2k+ | Non-prefixed class | |||
| #3437 | WPC Share Cart for WooCommerce | 97 | 32 | 1k+ | Non-prefixed hook name | |||
| #3438 | ZIP from Media | 97 | 4 | 16 | 400 | Non-prefixed global variable | ||
| #3439 | Broken Link Checker by AIOSEO – Find & Fix Broken Internal, External & Video Links | 98 | 1 | 15 | 300k+ | Non-prefixed global variable | ||
| #3440 | Change Author Link Structure | 98 | 1 | 5 | 800 | Direct Query | ||
| #3441 | Disable Generate Thumbnails | 98 | 1 | 14 | 6k+ | Non-prefixed global variable | ||
| #3442 | Easyship WooCommerce Shipping Rates | 98 | 1 | 16 | 2k+ | Direct Query | ||
| #3443 | HBAgency | 98 | 1 | 16 | 9k+ | Non-prefixed global variable | ||
| #3444 | Local Fonts Uploader – Upload & Host Any Font Locally for GDPR | 98 | 1 | 10 | 4k+ | Direct Query | ||
| #3445 | Mime Types Plus | 98 | 1 | 12 | 10k+ | Non-prefixed global variable | ||
| #3446 | Plus WebP or AVIF | 98 | 24 | 5k+ | Non-prefixed global variable | |||
| #3447 | ProvenExpert | 98 | 8 | 10 | 900 | wp function not compatible with requires wp | ||
| #3448 | Swift Switcher — Bulk & Custom Post Type Converter | 98 | 1 | 5 | 600 | Direct Query | ||
| #3449 | Trust Badges | 98 | 1 | 4 | 1k+ | Direct Query | ||
| #3450 | WP Database Reset | 98 | 1 | 10 | 5k+ | Direct Query |