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.

medium weight

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.

Affected Plugins

RankPluginScoreErrorsWarningsInstallsUpdatedTop Issue
#2351Surfer – WordPress Plugin971256k+Direct Query
#2352SVG Support971271m+Non-prefixed global variable
#2353Remote Website Management by Watchful974124k+Direct Query
#2354WPMR Google Feed Manager for WooCommerce – Sell on Google Merchant Center & Shopping971710k+trademarked term
#2355WPC Product Size Chart for WooCommerce97192k+Non-prefixed class
#2356Broken Link Checker by AIOSEO – Find & Fix Broken Internal, External & Video Links98115300k+Non-prefixed global variable
#2357Disable Generate Thumbnails981146k+Non-prefixed global variable
#2358Easyship WooCommerce Shipping Rates981162k+Direct Query
#2359HBAgency981169k+Non-prefixed global variable
#2360Local Fonts Uploader – Upload & Host Any Font Locally for GDPR981104k+Direct Query
#2361Mime Types Plus9811210k+Non-prefixed global variable
#2362Plus WebP or AVIF98245k+Non-prefixed global variable
#2363Trust Badges98141k+Direct Query
#2364WP Database Reset981105k+Direct Query
#2365Machete9977k+Direct Query
#2366Statify Filter9962k+Direct Query
#2367VS Meta Description99133k+Direct Query