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 |
|---|---|---|---|---|---|---|---|---|
| #651 | Login Widget With Shortcode | 26 | 335 | 198 | 6k+ | wp function not compatible with requires wp | ||
| #652 | OOPSpam Anti-Spam: Spam Protection for WordPress Forms & Comments (No CAPTCHA) | 26 | 272 | 599 | 6k+ | Request data is not unslashed | ||
| #653 | LoginWP (Formerly Peter's Login Redirect) | 26 | 401 | 278 | 90k+ | Output is not escaped | ||
| #654 | Post List Designer – Category Post, Recent Post, Post List | 26 | 542 | 1,320 | 1k+ | Non-prefixed global variable | ||
| #655 | Premmerce User Roles | 26 | 597 | 1,357 | 600 | Non-prefixed global variable | ||
| #656 | Pressidium Cookie Consent | 26 | 203 | 95 | 10k+ | Exception output is not escaped | ||
| #657 | Profile Extra Fields by BestWebSoft | 26 | 514 | 532 | 2k+ | Text Domain Mismatch | ||
| #658 | RestaurantPress | 26 | 265 | 518 | 600 | Output is not escaped | ||
| #659 | Role Based Pricing for Woo by Meow Crew | 26 | 548 | 1,354 | 2k+ | Non-prefixed global variable | ||
| #660 | Video Gallery – Vimeo and YouTube Gallery | 26 | 561 | 794 | 6k+ | Non-prefixed global variable | ||
| #661 | Carousel, Recent Post Slider and Banner Slider | 26 | 528 | 1,409 | 8k+ | Non-prefixed global variable | ||
| #662 | StoreGrowth: Smart Sales Booster for WooCommerce | BOGO, Upsells, Direct Checkout, Quick View, Side Cart | 26 | 125 | 420 | 2k+ | Non-prefixed global variable | ||
| #663 | Subscriber by BestWebSoft | 26 | 550 | 376 | 900 | Text Domain Mismatch | ||
| #664 | Visitors Online by BestWebSoft | 26 | 512 | 269 | 1k+ | Text Domain Mismatch | ||
| #665 | Premmerce SEO for WooCommerce | 26 | 550 | 1,285 | 1k+ | Non-prefixed global variable | ||
| #666 | Set Price Note (Units, Offers, Editions) for WooCommerce | 26 | 596 | 1,307 | 800 | Non-prefixed global variable | ||
| #667 | Shipping Method Display Style for WooCommerce | 26 | 529 | 1,308 | 2k+ | Non-prefixed global variable | ||
| #668 | Eventin – Event Calendar, Event Registration, Tickets & Booking (AI Powered) | 26 | 2,652 | 2,093 | 10k+ | Text Domain Mismatch | ||
| #669 | WPCOM Member | 26 | 432 | 638 | 1k+ | Non Singular String Literal Domain | ||
| #670 | Amazon Product in a Post Plugin | 27 | 362 | 416 | 800 | Output is not escaped | ||
| #671 | Integration for HubSpot and Contact Form 7, WPForms, Elementor, Ninja Forms | 27 | 720 | 367 | 5k+ | Text Domain Mismatch | ||
| #672 | WP Zoho for Contact Form 7, WPForms, Elementor, Formidable and Ninja Forms – CRM, Bigin | 27 | 692 | 381 | 3k+ | Text Domain Mismatch | ||
| #673 | Divi Collage | 27 | 516 | 1,183 | 700 | Non-prefixed global variable | ||
| #674 | Polls CP | 27 | 399 | 500 | 400 | Output is not escaped | ||
| #675 | Echo Knowledge Base – Documentation, FAQs, Chat & Smart Search | 27 | 289 | 751 | 10k+ | Output is not escaped | ||
| #676 | Events Calendar for GeoDirectory | 27 | 1,262 | 462 | 2k+ | Text Domain Mismatch | ||
| #677 | Extra Product Options for WooCommerce | 27 | 548 | 1,342 | 600 | Non-prefixed global variable | ||
| #678 | FG Joomla to WordPress | 27 | 278 | 101 | 7k+ | Unsafe printing function | ||
| #679 | Gravity Forms + Stripe | 27 | 368 | 210 | 600 | Output is not escaped | ||
| #680 | HM Multiple Roles | 27 | 537 | 1,287 | 1k+ | Non-prefixed global variable | ||
| #681 | Liza Widget For Spotify and Elementor | 27 | 609 | 1,287 | 1k+ | Non-prefixed global variable | ||
| #682 | Login Security Solution | 27 | 216 | 154 | 4k+ | Output is not escaped | ||
| #683 | Magical Shop Builder – WooCommerce Template Builder for Elementor | Shop, Cart, Checkout & Product Page Builder | 27 | 76 | 459 | 3k+ | Non-prefixed namespace | ||
| #684 | MakeCommerce for WooCommerce | 27 | 826 | 452 | 3k+ | Text Domain Mismatch | ||
| #685 | Memberful – Membership Plugin | 27 | 351 | 336 | 1k+ | Text Domain Mismatch | ||
| #686 | Multilanguage by BestWebSoft – WordPress Translation Plugin and Language Switcher | 27 | 465 | 345 | 3k+ | Text Domain Mismatch | ||
| #687 | Pie Register – User Registration, Profiles & Content Restriction | 27 | 1,779 | 1k+ | Non-prefixed global variable | |||
| #688 | Rate My Post – Star Rating Plugin by FeedbackWP | 27 | 222 | 360 | 20k+ | Output is not escaped | ||
| #689 | Restrict for Elementor | 27 | 530 | 1,223 | 900 | Non-prefixed global variable | ||
| #690 | SEO Booster | 27 | 422 | 1,456 | 1k+ | Non-prefixed global variable | ||
| #691 | Shipit | 27 | 371 | 209 | 400 | Text Domain Mismatch | ||
| #692 | Simple Download Monitor | 27 | 218 | 273 | 20k+ | Output is not escaped | ||
| #693 | Speed Booster Pack ⚡ PageSpeed Optimization Suite | 27 | 108 | 187 | 9k+ | Missing Translators Comment | ||
| #694 | Terms & Conditions Per Product | 27 | 533 | 1,336 | 800 | Non-prefixed global variable | ||
| #695 | VOD Infomaniak | 27 | 797 | 385 | 20k+ | Output is not escaped | ||
| #696 | Watu Quiz | 27 | 1,089 | 1,014 | 3k+ | Output is not escaped | ||
| #697 | Content Pilot – Autoblogging & Affiliate Marketing Suite | 27 | 299 | 269 | 900 | Output is not escaped | ||
| #698 | WP-DBManager | 27 | 386 | 304 | 60k+ | Non-prefixed global variable | ||
| #699 | wp-mpdf | 27 | 123 | 382 | 1k+ | Non-prefixed global variable | ||
| #700 | YARPP – Yet Another Related Posts Plugin | 27 | 191 | 331 | 100k+ | Non-prefixed global variable |