WordPress.DB.DirectDatabaseQuery.SchemaChange
Schema Change
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 |
|---|---|---|---|---|---|---|---|---|
| #601 | Tax Exemption for WooCommerce | 25 | 552 | 1,402 | 700 | Non-prefixed global variable | ||
| #602 | TemplateSpare – 1000+ WordPress Starter Templates & Full Site Migration Tool | 1-Click Import/Export & No-Code Builder | 25 | 705 | 1,587 | 10k+ | Non-prefixed global variable | ||
| #603 | Tourfic – AI Powered Travel Booking, Hotel Booking & Car Rental WordPress Plugin | 25 | 119 | 2,704 | 2k+ | Non-prefixed global variable | ||
| #604 | TrackShip for WooCommerce | 25 | 421 | 957 | 6k+ | Non-prefixed global variable | ||
| #605 | TrueBooker – Appointment Booking and Scheduler System | 25 | 529 | 2,746 | 600 | Non-prefixed global variable | ||
| #606 | Ultimate Blocks – 25+ Gutenberg Blocks for Block Editor | 25 | 691 | 1,581 | 50k+ | Non-prefixed global variable | ||
| #607 | 3D viewer by Visody | 25 | 832 | 1,322 | 1k+ | Non-prefixed global variable | ||
| #608 | WC Disable Zoom / Lightbox features | 25 | 529 | 1,297 | 700 | Non-prefixed global variable | ||
| #609 | Product Customer List for WooCommerce | 25 | 610 | 1,334 | 9k+ | Non-prefixed global variable | ||
| #610 | Advanced Shipment Tracking for WooCommerce | 25 | 499 | 704 | 60k+ | Non-prefixed global variable | ||
| #611 | Secure Gateway for Authorize.net and WooCommerce by Pledged Plugins | 25 | 907 | 1,418 | 10k+ | Non-prefixed global variable | ||
| #612 | Digital Goods (Checkout Field Editor) for WooCommerce Checkout | 25 | 539 | 1,479 | 3k+ | Non-prefixed global variable | ||
| #613 | Dynamic Pricing and Discount Rules for WooCommerce | 25 | 531 | 1,569 | 600 | Non-prefixed global variable | ||
| #614 | Flat Rate Shipping Method for WooCommerce | 25 | 1,242 | 1,778 | 5k+ | Non-prefixed global variable | ||
| #615 | HUSKY – Products Filter Professional for WooCommerce | 25 | 1,895 | 90k+ | Non-prefixed global variable | |||
| #616 | Wordfence Login Security | 25 | 248 | 418 | 70k+ | Output is not escaped | ||
| #617 | WP Airbnb Review Slider | 25 | 325 | 646 | 1k+ | Non-prefixed global variable | ||
| #618 | Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals | 25 | 137 | 353 | 60k+ | Input is not sanitized | ||
| #619 | WP Coupons and Deals – WordPress Coupon Plugin | 25 | 914 | 1,460 | 1k+ | Non-prefixed global variable | ||
| #620 | WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards | 25 | 1,431 | 1,270 | 10k+ | Output is not escaped | ||
| #621 | WP-DownloadManager | 25 | 607 | 508 | 3k+ | Unsafe printing function | ||
| #622 | Eventin – Event Calendar, Event Registration, Tickets & Booking (AI Powered) | 25 | 2,652 | 2,091 | 10k+ | Text Domain Mismatch | ||
| #623 | WP Review Slider | 25 | 1,186 | 2,279 | 6k+ | Non-prefixed global variable | ||
| #624 | WP Go Maps – Google Map, OpenStreetMap, Leaflet Map | 25 | 4,996 | 1,008 | 300k+ | Unsafe printing function | ||
| #625 | WP Google Review Slider | 25 | 1,367 | 2,584 | 30k+ | Non-prefixed global variable | ||
| #626 | WP Encryption – No.1 HTTPS plugin & One Click Free SSL Cert, HTTPS Redirect, Security | 25 | 727 | 1,554 | 50k+ | Non-prefixed global variable | ||
| #627 | WP Photo Album Plus | 25 | 4 | 1,807 | 10k+ | Direct Query | ||
| #628 | WP-Polls | 25 | 618 | 639 | 40k+ | Unsafe printing function | ||
| #629 | SlimStat Analytics | 25 | 1,177 | 870 | 70k+ | Exception output is not escaped | ||
| #630 | Smush – Image Optimization, Compression, Lazy Load, WebP & CDN | 25 | 244 | 568 | 1m+ | Non-prefixed hook name | ||
| #631 | WP Spell Check | 25 | 4,425 | 2k+ | Direct Query | |||
| #632 | WP Statistics – Simple, privacy-friendly Google Analytics alternative | 25 | 610 | 2,465 | 600k+ | Non-prefixed global variable | ||
| #633 | WP Time Slots Booking Form | 25 | 439 | 1,137 | 1k+ | Non-prefixed global variable | ||
| #634 | WP TripAdvisor Review Slider | 25 | 1,053 | 2,577 | 8k+ | Non-prefixed global variable | ||
| #635 | WP Yelp Review Slider | 25 | 429 | 645 | 1k+ | Non-prefixed global variable | ||
| #636 | Team Members Showcase | 25 | 591 | 1,494 | 4k+ | Non-prefixed global variable | ||
| #637 | WPvivid — Backup, Migration & Staging | 25 | 900 | 1,461 | 900k+ | Non-prefixed namespace | ||
| #638 | YT Player – Embed and Customize Video Players | 25 | 3,163 | 261 | 1k+ | Output is not escaped | ||
| #639 | AI Content Writing Assistant | 26 | 1,069 | 516 | 700 | Text Domain Mismatch | ||
| #640 | Bangladeshi Payments Mobile – QR Code & Transaction Reports | 26 | 535 | 1,280 | 1k+ | Non-prefixed global variable | ||
| #641 | Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line Messenger, WeChat, Email, SMS, Call Button – Chaty | 26 | 113 | 671 | 400k+ | Non-prefixed global variable | ||
| #642 | Conditional Logic for Woo Product Add-ons | 26 | 575 | 1,352 | 500 | Non-prefixed global variable | ||
| #643 | Database for Contact Form 7, WPforms, Elementor forms | 26 | 317 | 489 | 60k+ | Non-prefixed global variable | ||
| #644 | CP Multi View Events Calendar | 26 | 86 | 439 | 900 | Non-prefixed global variable | ||
| #645 | Ditty – Responsive News Tickers, Sliders, and Lists | 26 | 561 | 484 | 30k+ | Output is not escaped | ||
| #646 | Easy Post Views Count | 26 | 534 | 1,180 | 2k+ | Non-prefixed global variable | ||
| #647 | ezCache | 26 | 127 | 288 | 10k+ | Direct Query | ||
| #648 | RSS Redirect & Feedburner Alternative | 26 | 277 | 272 | 1k+ | Output is not escaped | ||
| #649 | FG Drupal to WordPress | 26 | 275 | 100 | 700 | Unsafe printing function | ||
| #650 | Hide Admin Bar Based on User Roles | 26 | 549 | 1,345 | 20k+ | Non-prefixed global variable |