90% shortcode-in-menus

Code Review | Shortcode in Menus

WordPress plugin Shortcode in Menus scored90%from 54 tests.

About plugin

  • Plugin page: shortcode-in-menus
  • Plugin version: 3.5.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 13, 2013
  • Latest release: May 27, 2023
  • Number of updates: 37
  • Update frequency: every 95.8 days
  • Top authors: gagan0123 (100%)

Code review

54 tests

User reviews

79 reviews

Install metrics

60,000+ active /442,670 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.65ms] Passed 4 tests

This is a short check of server-side resources used by Shortcode in Menus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.68 ▼6.68
Dashboard /wp-admin3.36 ▲0.0646.00 ▼1.68
Posts /wp-admin/edit.php3.48 ▲0.1248.13 ▲2.92
Add New Post /wp-admin/post-new.php5.94 ▲0.0696.97 ▲10.13
Media Library /wp-admin/upload.php3.29 ▲0.0637.44 ▲2.86

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Shortcode in Menus: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.21 ▼1.161.70 ▼0.3438.87 ▼5.95
Dashboard /wp-admin2,206 ▲214.81 ▼0.11110.60 ▼8.5239.73 ▼6.25
Posts /wp-admin/edit.php2,089 ▲32.15 ▲0.1043.04 ▲6.1335.82 ▲0.36
Add New Post /wp-admin/post-new.php1,533 ▼023.03 ▼0.12602.44 ▼57.5349.94 ▼14.88
Media Library /wp-admin/upload.php1,382 ▼34.24 ▲0.0696.60 ▼5.5445.29 ▼0.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #2, #3, #4, #5, #6, #7, #8 in shortcode-in-menus/assets to your readme.txt
You can take inspiration from this readme.txt

shortcode-in-menus/shortcode-in-menus.php Passed 13 tests

"Shortcode in Menus" version 3.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
58 characters long description:
Allows you to add shortcodes in WordPress Navigation Menus

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin276 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP493273239
JavaScript2182237

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity18.50
▷ Minimum class complexity15.00
▷ Maximum class complexity22.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods211.76%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin