94% add-descendants-as-submenu-items

Code Review | Add Descendants As Submenu Items

WordPress plugin Add Descendants As Submenu Items scored 94% from 54 tests.

About plugin

  • Plugin page: add-descendants-a...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Sep 5, 2011
  • Latest release: Feb 7, 2018
  • Number of updates: 15
  • Update frequency: every 156.5 days
  • Top authors: Viper007Bond (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

3,000+ active / 22,402 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼309.14ms] Passed 4 tests

Analyzing server-side resources used by Add Descendants As Submenu Items
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0459.89 ▲6.55
Dashboard /wp-admin3.45 ▲0.0432.27 ▼30.65
Posts /wp-admin/edit.php3.68 ▲0.0437.96 ▼21.02
Add New Post /wp-admin/post-new.php6.92 ▼0.0695.89 ▼1,187.76
Media Library /wp-admin/upload.php3.33 ▲0.0327.89 ▲2.86

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Add Descendants As Submenu Items
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5316.26 ▲0.236.70 ▲0.762.51 ▲0.49
Dashboard /wp-admin2,888 ▲276.11 ▼0.03120.03 ▼17.08180.08 ▲17.73
Posts /wp-admin/edit.php2,694 ▼03.23 ▼0.1463.46 ▼4.84140.42 ▼0.69
Add New Post /wp-admin/post-new.php1,661 ▲116.48 ▲0.73461.49 ▲5.75161.03 ▲5.06
Media Library /wp-admin/upload.php1,698 ▼05.51 ▼0.02147.74 ▼24.23219.66 ▲24.18

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/add-descendants-as-submenu-items/add-descendants-as-submenu-items.php:97

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: nav menu, children, descendants, menu

add-descendants-as-submenu-items/add-descendants-as-submenu-items.php 92% from 13 tests

The principal PHP file in "Add Descendants As Submenu Items" v. 1.2.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected214 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP173139175
JavaScript18939

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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