84% sailen-short-menu

Code Review | Sailen Short Menu

WordPress plugin Sailen Short Menu scored84%from 54 tests.

About plugin

  • Plugin page: sailen-short-menu
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.5.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2016
  • Latest release: Aug 2, 2016
  • Number of updates: 18
  • Update frequency: every 0.2 days
  • Top authors: shivaacharjee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /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
Install script ran successfully

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

This is a short check of server-side resources used by Sailen Short Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0137.17 ▼1.26
Dashboard /wp-admin3.31 ▲0.0046.41 ▲0.37
Posts /wp-admin/edit.php3.36 ▲0.0046.73 ▼3.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.68 ▼9.40
Media Library /wp-admin/upload.php3.23 ▲0.0033.76 ▲3.94

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Sailen Short Menu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.555.66 ▲3.9339.24 ▼5.56
Dashboard /wp-admin2,209 ▲215.91 ▲1.0599.30 ▼15.3938.41 ▼4.08
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0040.35 ▼0.6432.12 ▼4.21
Add New Post /wp-admin/post-new.php1,514 ▼017.66 ▲0.18686.01 ▲32.6153.23 ▼17.39
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0092.31 ▼4.5940.70 ▼5.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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)
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sailen-short-menu/sailen-short-menu.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
10 plugin tags: menu by name, shortcode widget, menu shortcode, display menu using shortcodes in posts, use plugin shortcode in widget...

sailen-short-menu/sailen-short-menu.php Passed 13 tests

The main PHP file in "Sailen Short Menu" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
123 characters long description:
Sailen Short Menu is a simple plugin which allow users to display nav-menus within post/pages and Sidebars using Shortcodes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin66 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2336240
Markdown126026

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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
No PNG images were found in this plugin