84% shortcode-menu

Code Review | Shortcode Menu

WordPress plugin Shortcode Menu scored84%from 54 tests.

About plugin

  • Plugin page: shortcode-menu
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Aug 2, 2013
  • Latest release: Jul 27, 2014
  • Number of updates: 46
  • Update frequency: every 7.8 days
  • Top authors: amitsukapure (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

3,000+ active /52,618 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
Installer ran successfully

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

A check of server-side resources used by Shortcode Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.82 ▼0.10
Dashboard /wp-admin3.32 ▼0.0349.27 ▼17.25
Posts /wp-admin/edit.php3.37 ▲0.0149.04 ▼4.37
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.45 ▼12.05
Media Library /wp-admin/upload.php3.24 ▲0.0139.44 ▼0.46

Server storage [IO: ▲0.21MB] [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: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Shortcode Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲15013.83 ▼0.548.94 ▲7.2942.72 ▲3.79
Dashboard /wp-admin2,235 ▲646.06 ▲0.4492.32 ▲0.0837.90 ▼6.07
Posts /wp-admin/edit.php2,124 ▲242.49 ▲0.4434.63 ▼2.2930.80 ▼2.44
Add New Post /wp-admin/post-new.php1,562 ▲3123.48 ▲0.03646.69 ▼66.8236.29 ▼20.48
Media Library /wp-admin/upload.php1,443 ▲464.60 ▲0.33105.24 ▼1.6346.04 ▼3.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shortcode-menu/shortcode-menu.php:311

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed: The official readme.txt might help

shortcode-menu/shortcode-menu.php 92% from 13 tests

The main file in "Shortcode Menu" v. 3.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,745 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS36782898
PHP212242800
JavaScript22233
SVG10014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity6.29
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/donate.png12.93KB5.41KB▼ 58.16%
images/simple-enhance.png3.72KB2.15KB▼ 42.07%
images/ol-enhance.png4.12KB2.34KB▼ 43.19%
images/q-icon.png1.28KB0.95KB▼ 26.18%
images/ol-simple.png3.44KB1.72KB▼ 49.87%