90% z-mini-admin-menu

Code Review | Z Mini Admin Menu

WordPress plugin Z Mini Admin Menu scored90%from 54 tests.

About plugin

  • Plugin page: z-mini-admin-menu
  • Plugin version: 1.0.12
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Aug 31, 2021
  • Latest release: Nov 9, 2023
  • Number of updates: 18
  • Update frequency: every 44.5 days
  • Top authors: martenmoolenaar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /2,539 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Z Mini Admin Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.64 ▼1.89
Dashboard /wp-admin3.35 ▲0.0546.35 ▼2.29
Posts /wp-admin/edit.php3.40 ▲0.0445.20 ▼7.77
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.60 ▼4.51
Media Library /wp-admin/upload.php3.27 ▲0.0434.32 ▼1.57
WP mini menu /wp-admin/options-general.php?page=z_mini_menu_plugin3.2431.96

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Z Mini Admin Menu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲4114.36 ▲0.011.16 ▼0.6244.75 ▲6.23
Dashboard /wp-admin2,223 ▲455.85 ▲0.1694.55 ▼21.3339.81 ▼4.05
Posts /wp-admin/edit.php2,129 ▲292.33 ▲0.3439.24 ▼1.1034.19 ▼4.84
Add New Post /wp-admin/post-new.php1,550 ▲2423.63 ▲0.73622.94 ▼45.9634.71 ▼33.37
Media Library /wp-admin/upload.php1,422 ▲224.40 ▲0.20100.26 ▼0.4641.96 ▼2.49
WP mini menu /wp-admin/options-general.php?page=z_mini_menu_plugin1,0992.4445.5732.54

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: development, cleanup, admin menu, mini menu, elementor...

z-mini-admin-menu/z-mini-menu.php 92% from 13 tests

The entry point to "Z Mini Admin Menu" version 1.0.12 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("z-mini-admin-menu.php" instead of "z-mini-menu.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 plugin1,282 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP2236177733
JavaScript12924416
CSS127112
Markdown116019
XML2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity16.25
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin