90% automatic-submenu

Code Review | Automatic Submenu for Categories & Pages

WordPress plugin Automatic Submenu for Categories & Pages scored90%from 54 tests.

About plugin

  • Plugin page: automatic-submenu
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.8.3
  • WordPress version: 6.3.1
  • First release: Nov 13, 2017
  • Latest release: Nov 13, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: rallisf1 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,019 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.03MB] [CPU: ▼4.16ms] Passed 4 tests

An overview of server-side resources used by Automatic Submenu for Categories & Pages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0340.75 ▲2.64
Dashboard /wp-admin3.32 ▲0.0247.43 ▲1.51
Posts /wp-admin/edit.php3.44 ▲0.0847.33 ▼3.96
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.74 ▼12.08
Media Library /wp-admin/upload.php3.25 ▲0.0232.36 ▼2.12

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Automatic Submenu for Categories & Pages: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.32 ▼1.431.67 ▼0.1544.26 ▼3.58
Dashboard /wp-admin2,208 ▲205.88 ▲1.0099.01 ▼13.8541.18 ▼3.83
Posts /wp-admin/edit.php2,091 ▲52.02 ▼0.1040.09 ▲0.4734.63 ▼2.16
Add New Post /wp-admin/post-new.php1,534 ▲123.71 ▲0.54680.97 ▲89.9153.94 ▲5.63
Media Library /wp-admin/upload.php1,390 ▲54.22 ▼0.0493.84 ▼0.4340.13 ▼1.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Requires php: Invalid plugin version format
You can take inspiration from this readme.txt

automatic-submenu/automatic-submenu.php Passed 13 tests

This is the main PHP file of "Automatic Submenu for Categories & Pages" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
62 characters long description:
Automatically append children posts and pages as submenu items

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected385 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP346106367
JavaScript10218

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity25.50
▷ Minimum class complexity18.00
▷ Maximum class complexity33.00
Average method complexity5.08
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin