10% autogen-headers-menu

Code Review | Autogen Headers Menu

WordPress plugin Autogen Headers Menu scored10%from 54 tests.

About plugin

  • Plugin page: autogen-headers-menu
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 6, 2013
  • Latest release: Jun 5, 2013
  • Number of updates: 5
  • Update frequency: every 6.0 days
  • Top authors: amirshk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,068 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/autogen-headers-menu/index.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; AmirshkAutogenHeaderMenu has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼51.41ms] Passed 4 tests

A check of server-side resources used by Autogen Headers Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.33 ▼34.09
Dashboard /wp-admin2.13 ▼1.218.92 ▼48.01
Posts /wp-admin/edit.php2.14 ▼1.227.75 ▼38.58
Add New Post /wp-admin/post-new.php2.13 ▼3.758.26 ▼84.95
Media Library /wp-admin/upload.php2.14 ▼1.098.27 ▼28.10

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_autogen_menu_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Autogen Headers Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8114.17 ▼0.181.89 ▲0.2342.37 ▼0.34
Dashboard /wp-admin2,192 ▲155.54 ▼0.0582.44 ▼0.6938.83 ▼5.19
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0635.61 ▼2.4231.30 ▼2.57
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▲0.31623.54 ▼30.0149.16 ▼22.14
Media Library /wp-admin/upload.php1,397 ▼04.20 ▲0.1091.94 ▼17.3740.86 ▼7.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the autogen-headers-menu-plugin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_autogen_menu_widget
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/autogen-headers-menu/index.php:123

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: generate, post, main-menu, widget, auto...

autogen-headers-menu/index.php 92% from 13 tests

The entry point to "Autogen Headers Menu" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("autogen-headers-menu.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin192 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12014149
CSS13143

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.00
▷ Minimum class complexity2.00
▷ Maximum class complexity16.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin