78% wp-db-driver

Code Review | WP DB Driver

WordPress plugin WP DB Driver scored78%from 54 tests.

About plugin

  • Plugin page: wp-db-driver
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-4.4.0
  • WordPress version: 6.3.1
  • First release: Jun 28, 2013
  • Latest release: Dec 27, 2015
  • Number of updates: 45
  • Update frequency: every 20.3 days
  • Top authors: markoheijnen (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

90+ active /9,272 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.38ms] Passed 4 tests

This is a short check of server-side resources used by WP DB Driver
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0436.02 ▼4.97
Dashboard /wp-admin3.34 ▲0.0444.98 ▼2.19
Posts /wp-admin/edit.php3.39 ▲0.0445.88 ▼7.75
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.65 ▼17.33
Media Library /wp-admin/upload.php3.27 ▲0.0433.47 ▼3.48
WP DB Driver /wp-admin/tools.php?page=wp-db-driver3.2430.61

Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP DB Driver
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.65 ▼0.751.88 ▲0.1242.72 ▼0.77
Dashboard /wp-admin2,210 ▲225.88 ▲0.7898.89 ▼3.7138.05 ▼4.56
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0033.60 ▼9.6732.47 ▼4.46
Add New Post /wp-admin/post-new.php1,536 ▲723.20 ▼0.05661.74 ▲56.7554.21 ▲6.30
Media Library /wp-admin/upload.php1,392 ▲104.27 ▼0.0293.54 ▼2.2644.42 ▲2.00
WP DB Driver /wp-admin/tools.php?page=wp-db-driver8052.0227.4628.67

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/tools.php?page=wp-db-driver
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/tools.php?page=wp-db-driver
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'wpdb_driver' not found in wp-content/plugins/wp-db-driver/drivers/pdo_mysql.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'wpdb_driver' not found in wp-content/plugins/wp-db-driver/drivers/mysqli.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'wpdb_driver' not found in wp-content/plugins/wp-db-driver/drivers/mysql.php:12
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-db-driver/wp-content/db.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/wp-db-driver/db.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'wpdb' not found in wp-content/plugins/wp-db-driver/inc/db-driver.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: database, mysqli, backend, pdo, mysql

wp-db-driver/wp-db-driver.php 92% from 13 tests

"WP DB Driver" version 2.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,091 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP116741,7282,091

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity63.29
▷ Minimum class complexity7.00
▷ Maximum class complexity308.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods156
▷ Static methods138.33%
▷ Public methods14291.03%
▷ Protected methods117.05%
▷ Private methods31.92%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin