89% automatically-hierarchic-categories-in-menu

Code Review | Automatically Hierarchic Categories in Menu

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

About plugin

  • Plugin page: automatically-hie...
  • Plugin version: 2.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2021
  • Latest release: Oct 6, 2023
  • Number of updates: 116
  • Update frequency: every 8.5 days
  • Top authors: atakanau (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /6,558 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 gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼21.59ms] 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 /3.53 ▲0.0638.59 ▲2.02
Dashboard /wp-admin3.41 ▲0.0643.89 ▼16.98
Posts /wp-admin/edit.php3.53 ▲0.1644.43 ▼31.25
Add New Post /wp-admin/post-new.php5.99 ▲0.1082.12 ▼40.14
Media Library /wp-admin/upload.php3.33 ▲0.1039.92 ▲5.42

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

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 /2,789 ▲2814.24 ▲0.041.76 ▼0.0039.18 ▼0.63
Dashboard /wp-admin2,195 ▲185.55 ▼0.1382.63 ▼72.3439.65 ▼65.23
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0433.96 ▼36.0532.29 ▼31.67
Add New Post /wp-admin/post-new.php1,410 ▼11618.12 ▼4.84604.20 ▼201.8045.44 ▼9.34
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.02123.91 ▲13.7951.85 ▲4.72

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 detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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
8 plugin tags: woocommerce category, nav-menu, navigation menu, category, woocommerce 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. 2.0.3 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:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • 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")

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 detected479 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4116317442
JavaScript2182137

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.60
Average class complexity45.50
▷ Minimum class complexity30.00
▷ Maximum class complexity61.00
Average method complexity5.24
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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