84% genesis-subpages-as-secondary-menu

Code Review | Genesis Subpages as Secondary Menu

WordPress plugin Genesis Subpages as Secondary Menu scored84%from 54 tests.

About plugin

  • Plugin page: genesis-subpages-...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Aug 18, 2011
  • Latest release: Aug 19, 2015
  • Number of updates: 23
  • Update frequency: every 89.7 days
  • Top authors: billerickson (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /13,569 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.65ms] Passed 4 tests

This is a short check of server-side resources used by Genesis Subpages as Secondary Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.07 ▼3.86
Dashboard /wp-admin3.31 ▲0.0047.07 ▼4.08
Posts /wp-admin/edit.php3.36 ▲0.0048.23 ▲0.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.02 ▼14.27
Media Library /wp-admin/upload.php3.23 ▲0.0035.92 ▼0.40

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Genesis Subpages as Secondary Menu
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.62 ▲0.072.03 ▲0.1147.55 ▲3.85
Dashboard /wp-admin2,195 ▲245.62 ▲0.0886.59 ▼1.7441.44 ▲0.09
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0536.50 ▼0.0037.45 ▲1.23
Add New Post /wp-admin/post-new.php1,529 ▲123.42 ▲0.39649.89 ▲19.4159.75 ▲8.74
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.09101.93 ▼7.8643.69 ▼2.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/genesis-subpages-as-secondary-menu/genesis-subpages-as-secondary-menu.php:33

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: menu, genesis, genesiswp, studiopress

genesis-subpages-as-secondary-menu/genesis-subpages-as-secondary-menu.php Passed 13 tests

The main file in "Genesis Subpages as Secondary Menu" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
130 characters long description:
Replaces the Genesis Secondary Menu with a dynamic listing of the current section's subpages. You must be using the Genesis Theme.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected78 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13710778

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin