WordPress.DB.RestrictedFunctions.mysql_mysqli_fetch_object

mysql mysqli fetch object

The plugin uses a raw MySQL extension or class instead of WordPress database APIs.

medium weight

Why It Shows Up

The scan found `mysql_*`, `mysqli_*`, PDO MySQL, or related database functions in plugin code.

Why It Matters

Bypassing `$wpdb` can ignore WordPress database configuration, escaping conventions, character sets, and compatibility layers.

How to Fix

  • Replace raw MySQL calls with `$wpdb` methods or higher-level WordPress APIs.
  • Use `$wpdb->prepare()` for dynamic values.
  • If a third-party library requires a database connection, isolate it and document why WordPress APIs cannot be used.

Affected Plugins

RankPluginScoreErrorsWarningsInstallsAddedUpdatedTop Issue
#1WP STAGING – WordPress Backups, Restore, Migration & Clone231,5471,726100k+Non-prefixed global variable
#2Screen Reader Accessibility – WCAG, Text-to-Speech & AI Accessibility Fixes24235330600Non-prefixed global variable
#3WEB-Translation – eTranslation Multilingual252171,057400Non-prefixed function
#4TranslatePress – Translate Multilingual sites with AI Translation255691,680400k+Non-prefixed hook name
#5WPvivid — Backup, Migration & Staging259031,461900k+Non-prefixed namespace
#6PW WooCommerce Bulk Edit3421914920k+Unsafe printing function