84% shortcode-options

Code Review | Shortcode Options

WordPress plugin Shortcode Options scored 84% from 54 tests.

About plugin

  • Plugin page: shortcode-options
  • Plugin version: 2.3.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2022
  • Latest release: May 4, 2023
  • Number of updates: 12
  • Update frequency: every 15.6 days
  • Top authors: icelayer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 402 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.99ms] Passed 4 tests

Analyzing server-side resources used by Shortcode Options
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.53 ▼0.87
Dashboard /wp-admin3.37 ▲0.0747.32 ▼7.27
Posts /wp-admin/edit.php3.48 ▲0.1347.12 ▼1.79
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.09 ▼6.01
Media Library /wp-admin/upload.php3.29 ▲0.0636.57 ▲3.68

Server storage [IO: ▲0.06MB] [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
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Shortcode Options: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.52 ▼0.871.94 ▲0.0937.98 ▼9.32
Dashboard /wp-admin2,206 ▲215.92 ▲0.9595.26 ▼8.9040.29 ▼7.82
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0134.80 ▼1.3332.90 ▼2.00
Add New Post /wp-admin/post-new.php1,535 ▲223.19 ▼0.03685.85 ▲18.9354.45 ▼2.82
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.0095.85 ▼0.5342.87 ▼3.04

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Trait 'ShortcodeOptions\\Traits\\Singleton' not found in wp-content/plugins/shortcode-options/src/ShortcodeOptions/Plugin.php on line 15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (...)
You can take inspiration from this readme.txt

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

The entry point to "Shortcode Options" version 2.3.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 251 characters long)

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
No dangerous file extensions were detected674 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP16161498669
JSON1005

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity13.86
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits1
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods47
▷ Static methods2144.68%
▷ Public methods4289.36%
▷ Protected methods24.26%
▷ Private methods36.38%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants1
▷ Global constants1100.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