84% genesis-simple-menus

Code Review | Genesis Simple Menus

WordPress plugin Genesis Simple Menus scored84%from 54 tests.

About plugin

  • Plugin page: genesis-simple-menus
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-6.3
  • WordPress version: 6.3.1
  • First release: Oct 3, 2010
  • Latest release: Aug 7, 2023
  • Number of updates: 50
  • Update frequency: every 93.8 days
  • Top authors: wpmuguru (64%)studiopress (22%)nathanrice (18%)

Code review

54 tests

User reviews

11 reviews

Install metrics

5,000+ active /122,064 total downloads

Benchmarks

Plugin footprint 83% from 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: ▼4.66ms] Passed 4 tests

This is a short check of server-side resources used by Genesis Simple Menus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.88 ▼2.09
Dashboard /wp-admin3.33 ▼0.0245.26 ▼11.28
Posts /wp-admin/edit.php3.38 ▲0.0243.79 ▼1.59
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.77 ▼3.68
Media Library /wp-admin/upload.php3.25 ▲0.0239.14 ▲7.15

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Genesis Simple Menus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.25 ▼0.131.63 ▼0.1238.37 ▼3.42
Dashboard /wp-admin2,201 ▲295.55 ▼0.0884.85 ▼15.5544.04 ▲2.65
Posts /wp-admin/edit.php2,106 ▲62.02 ▲0.0334.47 ▼1.0732.38 ▼3.75
Add New Post /wp-admin/post-new.php1,532 ▲623.21 ▼0.35669.42 ▼13.0553.46 ▼8.97
Media Library /wp-admin/upload.php1,406 ▲64.19 ▼0.0793.76 ▼12.0444.93 ▼2.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_support() in wp-content/plugins/genesis-simple-menus/includes/views/term-edit-field.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_support() in wp-content/plugins/genesis-simple-menus/includes/views/entry-metabox-content.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: genesis, navigation, menu, studiopress, genesiswp

genesis-simple-menus/simple-menu.php 92% from 13 tests

The main file in "Genesis Simple Menus" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("genesis-simple-menus.php" instead of "simple-menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin362 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8116303251
JSON30059
PO File13622
YAML13019
Markdown13011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.75
▷ Minimum class complexity3.00
▷ Maximum class complexity9.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin