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

RankPluginScoreErrorsWarningsInstallsUpdatedTop Issue
#1Prime Mover – Migrate WordPress Website & Backups221,3261,60010k+Non Prefixed Variable Found
#2WP STAGING – WordPress Backup, Restore & Migration231,4141,327100k+Non Prefixed Variable Found
#3TranslatePress – Translate Multilingual sites with AI Translation254521,541400k+Non Prefixed Hookname Found
#4WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards251,4311,27010k+Output Not Escaped
#5WPvivid — Backup, Migration & Staging258991,461900k+Non Prefixed Namespace Found
#6PW WooCommerce Bulk Edit3421914920k+Unsafe Printing Function