79% smart-menu-shortcode

Code Review | Menu Shortcode

WordPress plugin Menu Shortcode scored79%from 54 tests.

About plugin

  • Plugin page: smart-menu-shortcode
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: May 17, 2016
  • Latest release: May 17, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: farvehandleren (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,404 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.96MB] [CPU: ▼35.50ms] Passed 4 tests

An overview of server-side resources used by Menu Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0141.56 ▼4.49
Dashboard /wp-admin3.04 ▼0.3530.91 ▼35.93
Posts /wp-admin/edit.php3.04 ▼0.3626.66 ▼24.79
Add New Post /wp-admin/post-new.php3.04 ▼2.8924.18 ▼69.52
Media Library /wp-admin/upload.php3.04 ▼0.2324.56 ▼11.77

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Menu Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8914.34 ▼0.041.98 ▲0.1843.90 ▼1.72
Dashboard /wp-admin2,201 ▲275.68 ▲0.0883.47 ▼14.3669.96 ▲25.52
Posts /wp-admin/edit.php2,124 ▲211.98 ▼0.0541.10 ▲0.6533.56 ▼1.02
Add New Post /wp-admin/post-new.php1,556 ▲3023.24 ▲0.09614.99 ▼100.04163.07 ▲109.96
Media Library /wp-admin/upload.php1,415 ▲124.13 ▼0.06100.06 ▼3.2573.42 ▲22.70

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: shortcode, menu, navigation, menu shortcode

smart-menu-shortcode/main.php 85% from 13 tests

The main file in "Menu Shortcode" v. 1.0 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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smart-menu-shortcode.php" instead of "main.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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 plugin85 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2161285

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) img/sticky-icon.png3.62KB0.00KB▼ 100.00%