84% auto-submenu

Code Review | Auto Submenu

WordPress plugin Auto Submenu scored84%from 54 tests.

About plugin

  • Plugin page: auto-submenu
  • Plugin version: 0.3.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 26, 2012
  • Latest release: Aug 23, 2023
  • Number of updates: 7
  • Update frequency: every 591.0 days
  • Top authors: jamocreations (71.43%)anaid (42.86%)

Code review

54 tests

User reviews

23 reviews

Install metrics

3,000+ active /29,871 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.49ms] Passed 4 tests

This is a short check of server-side resources used by Auto Submenu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.02 ▼4.49
Dashboard /wp-admin3.31 ▲0.0146.81 ▼3.99
Posts /wp-admin/edit.php3.36 ▲0.0142.51 ▼16.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.27 ▼5.41
Media Library /wp-admin/upload.php3.24 ▲0.0133.98 ▼0.61

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

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

Browser metrics Passed 4 tests

Auto Submenu: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.34 ▼1.101.71 ▼0.1343.25 ▼0.48
Dashboard /wp-admin2,206 ▲184.83 ▼1.06113.02 ▼3.0442.25 ▼7.35
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0138.49 ▲1.2032.26 ▼5.39
Add New Post /wp-admin/post-new.php1,542 ▲618.27 ▼4.69638.44 ▲31.8061.50 ▲8.86
Media Library /wp-admin/upload.php1,388 ▼34.16 ▼0.02100.12 ▼3.7842.47 ▲0.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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 no errors were found, this is by no means an exhaustive test

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-submenu/auto-submenu.php:41

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: page, pages, submenu, navigation, admin...

auto-submenu/auto-submenu.php 92% from 13 tests

Analyzing the main PHP file in "Auto Submenu" version 0.3.0
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 144 characters long)

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
Good job! No executable or dangerous file extensions detected53 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1134353

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.82
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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