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 |
|---|---|---|---|---|---|---|---|---|
| #1651 | Image Source Control Lite – Show Image Credits and Captions | 33 | 140 | 221 | 3k+ | Non-prefixed hook name | ||
| #1652 | ImageLinks – Interactive Image Builder with Hotspots | 33 | 517 | 90 | 1k+ | Text Domain Mismatch | ||
| #1653 | Inactive User Deleter | 33 | 453 | 170 | 800 | Output is not escaped | ||
| #1654 | InPost Gallery | 33 | 105 | 245 | 700 | Non-prefixed global variable | ||
| #1655 | WPZOOM Social Feed Widget & Block | 33 | 310 | 278 | 60k+ | Unsafe printing function | ||
| #1656 | Intagrate Lite | 33 | 94 | 152 | 4k+ | date date | ||
| #1657 | IssueM | 33 | 56 | 173 | 600 | Request data is not unslashed | ||
| #1658 | ITRO Popup Plugin | 33 | 591 | 135 | 6k+ | Output is not escaped | ||
| #1659 | Logo Showcase Ultimate – Logo Carousel, Logo Slider & Logo Grid | 33 | 274 | 106 | 3k+ | Text Domain Mismatch | ||
| #1660 | LWSCache | 33 | 47 | 104 | 6k+ | Non-prefixed global variable | ||
| #1661 | Forms for Mailchimp by Optin Cat – Grow Your MailChimp List | 33 | 71 | 133 | 2k+ | Missing direct file access protection | ||
| #1662 | MWB HubSpot for WooCommerce – CRM, Abandoned Cart, Email Marketing, Marketing Automation & Analytics | 33 | 26 | 279 | 7k+ | Non-prefixed global variable | ||
| #1663 | MAS Companies For WP Job Manager | 33 | 62 | 308 | 1k+ | Non-prefixed hook name | ||
| #1664 | MaxiBlocks Builder | 17,000+ Design Assets, Patterns, Icons & Starter Sites | 33 | 2 | 503 | 700 | Non-prefixed function | ||
| #1665 | Membership For WooCommerce | 33 | 40 | 659 | 900 | Non-prefixed global variable | ||
| #1666 | Mollie Payments for WooCommerce | 33 | 70 | 123 | 100k+ | Dynamic hook name | ||
| #1667 | Molongui Post Contributors: Multi-Role Contributor Attribution | 33 | 240 | 162 | 400 | Output is not escaped | ||
| #1668 | News Announcement Scroll | 33 | 237 | 259 | 2k+ | Non-prefixed global variable | ||
| #1669 | Nomad World Map | 33 | 424 | 191 | 700 | Text Domain Mismatch | ||
| #1670 | Notification Master – Real-Time WordPress Notifications With Email, SMS, Webhooks & More | 33 | 293 | 215 | 1k+ | Text Domain Mismatch | ||
| #1671 | Pastacode | 33 | 77 | 66 | 400 | Non-prefixed global variable | ||
| #1672 | پینوا | Pinova | 33 | 171 | 75 | 500 | Output is not escaped | ||
| #1673 | Post Lists View Custom | 33 | 462 | 150 | 2k+ | Missing Arg Domain | ||
| #1674 | PublishPress Checklists: Pre-Publishing Approval Checklist – Validate Post Requirements | 33 | 140 | 182 | 3k+ | Missing Translators Comment | ||
| #1675 | PW WooCommerce Gift Cards | 33 | 238 | 186 | 20k+ | Output is not escaped | ||
| #1676 | Quick Restaurant Reservations | 33 | 654 | 179 | 500 | Text Domain Mismatch | ||
| #1677 | Frisbii Pay | 33 | 91 | 292 | 1k+ | Non-prefixed global variable | ||
| #1678 | Rename wp-login.php to anything you want | 33 | 251 | 117 | 500 | Output is not escaped | ||
| #1679 | Review Slider for WooCommerce | 33 | 160 | 422 | 400 | Non-prefixed global variable | ||
| #1680 | Reviews Plus | 33 | 223 | 378 | 1k+ | Non-prefixed function | ||
| #1681 | RTMKit | 33 | 11 | 388 | 50k+ | Non-prefixed global variable | ||
| #1682 | Live Sales Notification (Recent Sales Popups) | 33 | 114 | 120 | 400 | SQL query is not prepared | ||
| #1683 | Schema & Structured Data for WP & AMP | 33 | 63 | 246 | 100k+ | Non-prefixed global variable | ||
| #1684 | Sessions | 33 | 196 | 103 | 900 | Output is not escaped | ||
| #1685 | TaxCloud for WooCommerce | 33 | 23 | 261 | 500 | Non-prefixed function | ||
| #1686 | SMTP2GO for WordPress – Email Made Easy | 33 | 186 | 111 | 30k+ | Output is not escaped | ||
| #1687 | Social Rocket – Social Sharing Plugin | 33 | 1,016 | 255 | 1k+ | Unsafe printing function | ||
| #1688 | Spiffy Calendar | 33 | 473 | 243 | 3k+ | Output is not escaped | ||
| #1689 | Spin Wheel – Interactive spinning wheel that offers coupons | 33 | 680 | 313 | 500 | Unsafe printing function | ||
| #1690 | Simple Sticky Add To Cart For WooCommerce | 33 | 401 | 70 | 900 | Text Domain Mismatch | ||
| #1691 | Sublanguage | 33 | 266 | 287 | 700 | Output is not escaped | ||
| #1692 | WP Twitter Auto Publish | 33 | 442 | 171 | 4k+ | Output is not escaped | ||
| #1693 | Uix Shortcodes | 33 | 246 | 444 | 400 | Non-prefixed global variable | ||
| #1694 | Display Posts As List, Grid, Thumbs | 33 | 442 | 241 | 900 | Output is not escaped | ||
| #1695 | Variation Swatches for WooCommerce | 33 | 469 | 116 | 50k+ | Text Domain Mismatch | ||
| #1696 | Webmention | 33 | 64 | 89 | 900 | Output is not escaped | ||
| #1697 | Website Monetization by MageNet | 33 | 60 | 87 | 20k+ | Output is not escaped | ||
| #1698 | Textmetrics | 33 | 324 | 163 | 400 | Output is not escaped | ||
| #1699 | White Label CMS | 33 | 412 | 202 | 200k+ | Unsafe printing function | ||
| #1700 | Rich Showcase for Google Reviews | 33 | 213 | 278 | 100k+ | Output is not escaped |