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 | Updated | Top Issue |
|---|---|---|---|---|---|---|---|
| #2001 | Enhanced Category Pages | 55 | 23 | 25 | 2k+ | Direct Query | |
| #2002 | Go Live Update Urls | 55 | 11 | 49 | 80k+ | Non Prefixed Hookname Found | |
| #2003 | JetWidgets For Elementor | 55 | 99 | 274 | 10k+ | Non Prefixed Variable Found | |
| #2004 | LoginPress | wp-login Custom Login Page Customizer | 55 | 124 | 301 | 200k+ | Non Prefixed Function Found | |
| #2005 | Fast Page & Post Duplicator | 55 | 12 | 25 | 60k+ | Direct Query | |
| #2006 | Page Tagger | 55 | 30 | 10 | 2k+ | Output Not Escaped | |
| #2007 | Themeflection Numbers – Number Counter and Animated Numbers | 55 | 224 | 73 | 3k+ | Text Domain Mismatch | |
| #2008 | VS Contact Form | 55 | 3 | 318 | 7k+ | Non Prefixed Variable Found | |
| #2009 | VK Block Patterns | 55 | 8 | 61 | 100k+ | Non Prefixed Function Found | |
| #2010 | AI Copilot – ChatGPT Chatbot & AI Engine for Post Automation | 56 | 65 | 20 | 1k+ | Text Domain Mismatch | |
| #2011 | Booking Calendar | 56 | 16 | 40 | 50k+ | wp function not compatible with requires wp | |
| #2012 | TableKit: Table Builder Blocks for Gutenberg | 56 | 80 | 20 | 2k+ | Missing Translators Comment | |
| #2013 | WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance | 56 | 5 | 769 | 1m+ | Non Prefixed Variable Found | |
| #2014 | Delete Pending Comments | 57 | 16 | 11 | 10k+ | Unsafe Printing Function | |
| #2015 | iConvert Promoter | 57 | 98 | 217 | 1k+ | Non Prefixed Variable Found | |
| #2016 | Internal Link Juicer: SEO Auto Linker for WordPress | 57 | 12 | 61 | 90k+ | Unescaped DBParameter | |
| #2017 | Longer Permalinks | 57 | 27 | 21 | 8k+ | Missing Arg Domain | |
| #2018 | Remove admin menus by role | 57 | 5 | 54 | 8k+ | Input Not Validated | |
| #2019 | Search Exclude | 57 | 73 | 40 | 50k+ | Text Domain Mismatch | |
| #2020 | Ultimate Member – Terms & Conditions | 57 | 19 | 9 | 4k+ | Output Not Escaped | |
| #2021 | Filter Orders by Product for WooCommerce | 57 | 9 | 21 | 4k+ | Recommended | |
| #2022 | Sequential Order Numbers for WooCommerce | 57 | 9 | 24 | 10k+ | Interpolated Not Prepared | |
| #2023 | WP Table Builder – Drag & Drop Table Builder | 57 | 55 | 39 | 50k+ | Not Allowed | |
| #2024 | BCM Duplicate Menu | 58 | 8 | 11 | 4k+ | Recommended | |
| #2025 | Debloat – Remove Unused CSS, Optimize JS | 58 | 24 | 20 | 30k+ | Recommended | |
| #2026 | Error Log Viewer by BestWebSoft | 58 | 433 | 172 | 6k+ | Text Domain Mismatch | |
| #2027 | flowpaper | 58 | 14 | 31 | 10k+ | Non Prefixed Function Found | |
| #2028 | Videopack | 58 | 28 | 108 | 10k+ | Input Not Sanitized | |
| #2029 | View Admin As | 58 | 307 | 135 | 9k+ | Non Singular String Literal Domain | |
| #2030 | Social Media Auto Poster – Schedule & Publish to Buffer | 58 | 23 | 212 | 8k+ | Dynamic Hookname Found | |
| #2031 | Social Chat – Click To Chat App Button | 58 | 81 | 42 | 200k+ | Text Domain Mismatch | |
| #2032 | Custom API for WP | 59 | 173 | 16 | 1k+ | wp function not compatible with requires wp | |
| #2033 | Display Post Types – Post Grid, post list and post sliders | 59 | 24 | 14 | 7k+ | Output Not Escaped | |
| #2034 | Hide Posts | 59 | 9 | 70 | 20k+ | Direct Query | |
| #2035 | Ultimate Gift Cards for WooCommerce | 59 | 3 | 448 | 7k+ | Non Prefixed Variable Found | |
| #2036 | GST Invoice for WooCommerce | 59 | 10 | 42 | 1k+ | Missing | |
| #2037 | Variation Swatches for WooCommerce | 59 | 11 | 64 | 300k+ | Non Prefixed Variable Found | |
| #2038 | RevivePress – Keep your Old Content Evergreen | 59 | 27 | 46 | 5k+ | date date | |
| #2039 | Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant | 60 | 11 | 740 | 10k+ | Non Prefixed Variable Found | |
| #2040 | Post Duplicator | 60 | 33 | 24 | 200k+ | missing direct file access protection | |
| #2041 | Stream | 60 | 24 | 99 | 80k+ | Direct Query | |
| #2042 | WPB Popup for Contact Form 7 – Showing Contact Form 7 Popup on Button Click | 60 | 21 | 9 | 6k+ | Output Not Escaped | |
| #2043 | ELEX WooCommerce Catalog Mode | 61 | 97 | 49 | 10k+ | Text Domain Mismatch | |
| #2044 | GetPaid Stripe Payments | 61 | 206 | 44 | 2k+ | Text Domain Mismatch | |
| #2045 | Media Library Helper — Bulk edit image ALT, caption & description | 61 | 16 | 70 | 10k+ | Non Prefixed Variable Found | |
| #2046 | Powerkit – Supercharge your WordPress Site | 61 | 67 | 115 | 10k+ | Non Prefixed Variable Found | |
| #2047 | PW WooCommerce Copy Coupon | 61 | 15 | 17 | 1k+ | Text Domain Mismatch | |
| #2048 | Slider Factory | 61 | 3 | 414 | 2k+ | Non Prefixed Variable Found | |
| #2049 | WP Optin Wheel – Gamified Optin Email Marketing Tool for WordPress and WooCommerce | 61 | 22 | 74 | 1k+ | Non Prefixed Variable Found | |
| #2050 | Add Meta Tag Keywords | 62 | 6 | 15 | 1k+ | Missing |