84% mariadb-health-checks

Code Review | MariaDB Health Checks

WordPress plugin MariaDB Health Checks scored84%from 54 tests.

About plugin

  • Plugin page: mariadb-health-ch...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Apr 3, 2023
  • Latest release: Jun 15, 2023
  • Number of updates: 10
  • Update frequency: every 7.6 days
  • Top authors: l1nuxjedi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,565 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼5.06ms] Passed 4 tests

A check of server-side resources used by MariaDB Health Checks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2259.06 ▲7.07
Dashboard /wp-admin3.88 ▲0.5755.54 ▲0.77
Posts /wp-admin/edit.php3.64 ▲0.2849.20 ▼8.93
Add New Post /wp-admin/post-new.php6.13 ▲0.2489.73 ▼10.88
Media Library /wp-admin/upload.php3.45 ▲0.2237.43 ▼1.18
MariaDB Health Checks /wp-admin/tools.php?page=mdbhc3.9442.10

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 56 new files
Database: 3 new tables, 6 new options
New tables
wp_mariadb_config
wp_mariadb_versions
wp_mariadb_execution_time
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

MariaDB Health Checks: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲13413.67 ▼0.932.40 ▲0.5462.51 ▲18.01
Dashboard /wp-admin2,298 ▲925.50 ▼0.57105.03 ▲2.0945.57 ▲1.43
Posts /wp-admin/edit.php2,126 ▲262.65 ▲0.6640.61 ▲0.3434.25 ▼2.84
Add New Post /wp-admin/post-new.php1,540 ▼523.78 ▲0.63678.40 ▼2.2136.87 ▼20.71
Media Library /wp-admin/upload.php1,420 ▲205.05 ▲0.92110.76 ▲0.1749.40 ▲0.91
MariaDB Health Checks /wp-admin/tools.php?page=mdbhc1,1602.6131.7037.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'MDBHC\\Histograms' not found in wp-content/plugins/mariadb-health-checks/templates/admin/main-warnings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mariadb-health-checks/templates/admin/main.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getAllDbInformation() in wp-content/plugins/mariadb-health-checks/templates/admin/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mariadb-health-checks/templates/admin/main-tools.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mariadb-health-checks/templates/admin/main-data.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mariadb-health-checks/templates/admin/main-alarms.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mariadb-health-checks/templates/admin/main-accessibility.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'MDBHC\\Histograms' not found in wp-content/plugins/mariadb-health-checks/templates/admin/notices.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mariadb-health-checks/templates/admin/main-events.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mariadb-health-checks/templates/admin/main-general.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 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
3 plugin tags: site health, performance, mariadb

mariadb-health-checks/mariadb-health-checks.php Passed 13 tests

The main PHP file in "MariaDB Health Checks" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
21 characters long description:
MariaDB Health Checks

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin2,864 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP344303852,277
PO File1178265383
JavaScript3925135
SQL60036
JSON20020
Markdown1709
CSS1004

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.58
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods68
▷ Static methods2536.76%
▷ Public methods6291.18%
▷ Protected methods00.00%
▷ Private methods68.82%
Functions20
▷ Named functions1995.00%
▷ Anonymous functions15.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin