84% add-descendants-as-submenu-items

Code Review | Add Descendants As Submenu Items

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

About plugin

  • Plugin page: add-descendants-a...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 5, 2011
  • Latest release: Sep 6, 2022
  • Number of updates: 16
  • Update frequency: every 251.2 days
  • Top authors: Viper007Bond (93.75%)jakeom (12.5%)

Code review

54 tests

User reviews

20 reviews

Install metrics

3,000+ active /28,185 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.45ms] Passed 4 tests

An overview of server-side resources used by Add Descendants As Submenu Items
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.86 ▲0.13
Dashboard /wp-admin3.34 ▲0.0444.42 ▼4.89
Posts /wp-admin/edit.php3.39 ▲0.0346.08 ▼6.50
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.50 ▼10.52
Media Library /wp-admin/upload.php3.26 ▲0.0336.00 ▲0.68

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Descendants As Submenu Items
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.17 ▼1.215.36 ▲3.5644.99 ▲0.80
Dashboard /wp-admin2,206 ▲214.85 ▼1.01111.09 ▲9.3439.96 ▼1.60
Posts /wp-admin/edit.php2,089 ▼31.99 ▲0.0140.33 ▲3.1733.99 ▼4.30
Add New Post /wp-admin/post-new.php1,534 ▼423.15 ▼0.12570.98 ▼86.6055.14 ▲7.46
Media Library /wp-admin/upload.php1,391 ▲34.29 ▲0.0899.26 ▲2.7943.30 ▼1.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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:98

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: nav menu, children, descendants, menu

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

Analyzing the main PHP file in "Add Descendants As Submenu Items" version 1.2.2
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 150 characters long)

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
Success! There were no dangerous files found in this plugin217 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP174140178
JavaScript18939

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity5.62
▷ Minimum method complexity1.00
▷ Maximum method complexity12.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin