83% auto-subpage-menu

Code Review | Auto Subpage Menu

WordPress plugin Auto Subpage Menu scored83%from 54 tests.

About plugin

  • Plugin page: auto-subpage-menu
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 27, 2015
  • Latest release: Aug 4, 2020
  • Number of updates: 19
  • Update frequency: every 95.0 days
  • Top authors: jojoee (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /8,497 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Auto Subpage Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.50 ▼1.37
Dashboard /wp-admin3.31 ▼0.0451.96 ▼20.47
Posts /wp-admin/edit.php3.36 ▲0.0050.79 ▼0.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.89 ▼24.48
Media Library /wp-admin/upload.php3.23 ▲0.0036.65 ▼1.04

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Auto Subpage Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.36 ▲0.001.76 ▲0.0845.02 ▲3.78
Dashboard /wp-admin2,198 ▲185.49 ▼0.1791.73 ▼5.0241.28 ▼7.04
Posts /wp-admin/edit.php2,097 ▼61.98 ▼0.0135.20 ▼0.5434.97 ▼2.91
Add New Post /wp-admin/post-new.php1,526 ▼1123.03 ▼2.12666.66 ▲34.5255.16 ▼21.07
Media Library /wp-admin/upload.php1,397 ▼34.21 ▼0.0198.41 ▼7.9247.40 ▼0.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-subpage-menu/auto-subpage-menu.php:16

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 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: These screenshots require images: #1 (When publish subpage then add it into menus (screenshot-1.jpg)), #2 (When update subpage then update menus (screenshot-2.jpg)), #3 (When trash subpage then remove it from menus (screenshot-3.jpg)), #4 (When restore subpage then add it into menus (screenshot-4.jpg))
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

auto-subpage-menu/auto-subpage-menu.php 92% from 13 tests

This is the main PHP file of "Auto Subpage Menu" version 1.1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin133 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13838133

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.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

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