99% automatically-hierarchic-categories-in-menu

Code Review | Automatically Hierarchic Categories in Menu

WordPress plugin Automatically Hierarchic Categories in Menu scored 99% from 54 tests.

About plugin

  • Plugin page: automatically-hie...
  • Plugin version: 1.00
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.2-5.7.2
  • WordPress version: 5.8.1
  • First release: Jan 26, 2021
  • Latest release: May 23, 2021
  • Number of updates: 16
  • Update frequency: every 7.4 days
  • Top authors: atakanau (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 154 total downloads

Benchmarks

Plugin footprint Passed 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 gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼141.08ms] Passed 4 tests

This is a short check of server-side resources used by Automatically Hierarchic Categories in Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1545.05 ▲18.80
Dashboard /wp-admin3.14 ▲0.0847.59 ▼1.22
Posts /wp-admin/edit.php3.19 ▲0.0845.83 ▼1.31
Add New Post /wp-admin/post-new.php5.50 ▲0.0694.37 ▼568.86
Media Library /wp-admin/upload.php3.08 ▲0.0842.66 ▲7.09

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Automatically Hierarchic Categories in Menu: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.76 ▼0.148.69 ▼1.6448.72 ▼1.59
Dashboard /wp-admin2,973 ▲425.86 ▼0.09165.04 ▲17.18114.14 ▼10.21
Posts /wp-admin/edit.php2,739 ▼02.82 ▲0.1571.03 ▲0.8188.91 ▲0.93
Add New Post /wp-admin/post-new.php1,683 ▼015.85 ▼2.49443.50 ▲68.59125.49 ▲13.05
Media Library /wp-admin/upload.php1,807 ▼35.03 ▲0.01177.65 ▲19.45142.48 ▲17.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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 everything seems fine, this is not 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
Congratulations! This plugin passed the SRP 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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: category, automatically category, automatic category menu, auto menu, menu

automatically-hierarchic-categories-in-menu/auto-hierarchic-category-menu.php 85% from 13 tests

The main file in "Automatically Hierarchic Categories in Menu" v. 1.00 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("automatically-hierarchic-categories-in-menu.php" instead of "auto-hierarchic-category-menu.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected379 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4103284342
JavaScript2182237

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity30.50
▷ Minimum class complexity23.00
▷ Maximum class complexity38.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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 are no PNG files in this plugin