84% auto-generate-submenus

Code Review | Auto Generate Submenus

WordPress plugin Auto Generate Submenus scored 84% from 54 tests.

About plugin

  • Plugin page: auto-generate-sub...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7.4
  • WordPress version: 6.3.1
  • First release: Mar 8, 2017
  • Latest release: Apr 24, 2017
  • Number of updates: 9
  • Update frequency: every 4.4 days
  • Top authors: willybahuaud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,922 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▼6.56ms] Passed 4 tests

Analyzing server-side resources used by Auto Generate Submenus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0634.27 ▼6.86
Dashboard /wp-admin3.54 ▲0.2447.93 ▼1.80
Posts /wp-admin/edit.php3.66 ▲0.3049.69 ▲0.36
Add New Post /wp-admin/post-new.php6.12 ▲0.2487.73 ▼17.93
Media Library /wp-admin/upload.php3.47 ▲0.2435.91 ▲2.60

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Auto Generate Submenus
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.24 ▼1.171.62 ▼0.5641.99 ▼1.22
Dashboard /wp-admin2,209 ▲185.91 ▲0.03103.85 ▼3.9942.36 ▲3.10
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0439.12 ▲0.8935.84 ▲0.04
Add New Post /wp-admin/post-new.php1,547 ▲1423.13 ▼0.20673.62 ▲32.4157.03 ▼0.84
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0198.68 ▼3.3140.41 ▼5.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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_filter() in wp-content/plugins/auto-generate-submenus/auto-generate-submenus.php:19

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: generate, auto, wp-nav-menu, menus, menu...

auto-generate-submenus/auto-generate-submenus.php Passed 13 tests

"Auto Generate Submenus" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
84 characters long description:
With this plugin, you can add an automatically generated submenu for each menu item.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin200 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11472200

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity6.00
▷ Minimum method complexity6.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
No PNG images were found in this plugin