WordPress.DB.RestrictedFunctions.mysql_mysqli_connect

mysql mysqli connect

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
#1Backup Migration219811,09380k+Non Prefixed Variable Found
#2WP phpMyAdmin214,5286,43550k+Missing Arg Domain
#3wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin211,3541,14070k+Output Not Escaped
#4Smart Popup by Supsystic223,17250310k+Non Singular String Literal Domain
#5File Manager227405201m+Unsafe Printing Function
#6WPBot – AI ChatBot for Live Support, Lead Generation, AI Services232641,0185k+Non Prefixed Variable Found
#7Redirection23523457100k+Non Prefixed Variable Found
#8Softaculous231164910k+file system operations fread
#9Clone2324426240k+Output Not Escaped
#10A2 Optimized WP – Turbocharge and secure your WordPress site2427123160k+Missing Arg Domain
#11Backuply – Backup, Restore, Migrate and Clone24704551700k+Non Prefixed Variable Found
#12Data Tables Generator by Supsystic251388210k+Exception Not Escaped
#13TranslatePress – Translate Multilingual sites with AI Translation254521,541400k+Non Prefixed Hookname Found
#14Social Media Share Buttons & Social Sharing Icons252,4331,383100k+Unsafe Printing Function
#15Social Share Icons & Social Share Buttons252,3651,35710k+Output Not Escaped
#16Duplicate Post27447274300k+Unsafe Printing Function
#17Void Contact Form 7 Widget For Elementor Page Builder282796610k+Text Domain Mismatch
#18Pop-up311039110k+Output Not Escaped
#19Ultimate Posts Widget313098610k+Output Not Escaped
#20Enhanced Text Widget341015830k+Output Not Escaped
#21SSL Mixed Content Fix3453658k+Output Not Escaped
#22Graphina – Charts and Graphs For Elementor391,89511310k+Text Domain Mismatch
#23Display PHP Version966230k+Not In Footer