78% mysqli

Code Review | MySQLi database layer

WordPress plugin MySQLi database layer scored78%from 54 tests.

About plugin

  • Plugin page: mysqli
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6
  • WordPress version: 6.3.1
  • First release: Jun 23, 2013
  • Latest release: Sep 18, 2013
  • Number of updates: 7
  • Update frequency: every 12.4 days
  • Top authors: markoheijnen (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

100+ active /15,637 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.88ms] Passed 4 tests

An overview of server-side resources used by MySQLi database layer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.76 ▲3.11
Dashboard /wp-admin3.33 ▲0.0347.36 ▼7.37
Posts /wp-admin/edit.php3.38 ▲0.0354.21 ▲1.47
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.87 ▼8.73
Media Library /wp-admin/upload.php3.25 ▲0.0338.23 ▲3.85
MySQLi /wp-admin/tools.php?page=mysqli3.2032.49

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for MySQLi database layer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.72 ▲0.452.20 ▲0.3337.87 ▼6.45
Dashboard /wp-admin2,202 ▲225.65 ▼0.0289.47 ▲0.2241.86 ▲1.75
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0337.76 ▲0.7738.05 ▼0.08
Add New Post /wp-admin/post-new.php1,529 ▲123.86 ▲0.70665.51 ▼1.8965.65 ▲10.41
Media Library /wp-admin/upload.php1,404 ▲14.16 ▼0.0198.46 ▼3.2841.28 ▼1.36
MySQLi /wp-admin/tools.php?page=mysqli7772.0023.6726.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=mysqli
    • > 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=mysqli
    • > 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'wpdb' not found in wp-content/plugins/mysqli/db.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
2 plugin tags: backend, database

mysqli/wp-mysqli.php 92% from 13 tests

"MySQLi database layer" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mysqli.php" instead of "wp-mysqli.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin271 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP382132271

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity28.50
▷ Minimum class complexity20.00
▷ Maximum class complexity37.00
Average method complexity4.93
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods1392.86%
▷ Protected methods17.14%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected