84% automatic-hx-menu

Code Review | Automatic Hx Menu

WordPress plugin Automatic Hx Menu scored84%from 54 tests.

About plugin

  • Plugin page: automatic-hx-menu
  • Plugin version: 2.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.4-5.8
  • WordPress version: 6.3.1
  • First release: May 6, 2017
  • Latest release: Sep 2, 2021
  • Number of updates: 42
  • Update frequency: every 37.7 days
  • Top authors: albedo0 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,351 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼5.26ms] Passed 4 tests

Server-side resources used by Automatic Hx Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2442.98 ▲5.65
Dashboard /wp-admin3.58 ▲0.2850.50 ▲3.16
Posts /wp-admin/edit.php3.70 ▲0.3446.08 ▼6.66
Add New Post /wp-admin/post-new.php6.16 ▲0.2881.34 ▼18.11
Media Library /wp-admin/upload.php3.51 ▲0.2839.22 ▲0.59

Server storage [IO: ▲0.16MB] [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: 21 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Automatic Hx Menu: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲16613.63 ▼0.748.51 ▲6.7541.29 ▼1.46
Dashboard /wp-admin2,206 ▲215.87 ▼0.03112.05 ▲10.0885.89 ▲43.81
Posts /wp-admin/edit.php2,101 ▲122.01 ▼0.0433.37 ▼11.4132.25 ▼4.08
Add New Post /wp-admin/post-new.php1,680 ▲16622.35 ▲4.88756.19 ▲84.6663.40 ▼2.42
Media Library /wp-admin/upload.php1,403 ▲154.15 ▼0.13108.76 ▼2.3043.90 ▼2.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • automatichxmenu_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/automatic-hx-menu/automatichxmenu.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% 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
8 plugin tags: automatic, h1, button, links, menu generator...

automatic-hx-menu/automatichxmenu.php 85% from 13 tests

This is the main PHP file of "Automatic Hx Menu" version 2.7.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("automatic-hx-menu.php" instead of "automatichxmenu.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,745 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File1125141303

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity34.00
▷ Minimum class complexity5.00
▷ Maximum class complexity74.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions150.00%
▷ Anonymous functions150.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo.png6.96KB2.96KB▼ 57.43%
img/logo_plugin.png3.64KB1.78KB▼ 51.09%
img/logo_small.png1.00KB0.10KB▼ 89.58%