90% shortcode-widget

Code Review | Shortcode Widget

WordPress plugin Shortcode Widget scored90%from 54 tests.

About plugin

  • Plugin page: shortcode-widget
  • Plugin version: 1.5.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 6, 2013
  • Latest release: May 27, 2023
  • Number of updates: 37
  • Update frequency: every 101.7 days
  • Top authors: gagan0123 (97.3%)saurabhshukla (5.41%)

Code review

54 tests

User reviews

33 reviews

Install metrics

20,000+ active /398,957 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.99ms] Passed 4 tests

Analyzing server-side resources used by Shortcode Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.55 ▼6.70
Dashboard /wp-admin3.32 ▲0.0149.89 ▼3.54
Posts /wp-admin/edit.php3.37 ▲0.0151.90 ▲1.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.72 ▼11.68
Media Library /wp-admin/upload.php3.24 ▲0.0139.28 ▲4.10

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_shortcode-widget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Shortcode Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.37 ▲0.181.77 ▼0.2542.19 ▼2.08
Dashboard /wp-admin2,198 ▲215.59 ▲0.0385.78 ▼8.9138.55 ▼1.62
Posts /wp-admin/edit.php2,100 ▼31.98 ▲0.0133.41 ▼4.0233.85 ▼3.90
Add New Post /wp-admin/post-new.php1,526 ▼223.07 ▼0.03649.28 ▼21.0560.76 ▼3.12
Media Library /wp-admin/upload.php1,400 ▲34.30 ▲0.07102.50 ▼3.0245.59 ▲0.22

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_shortcode-widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: widget, shortcode

shortcode-widget/shortcode-widget.php Passed 13 tests

This is the main PHP file of "Shortcode Widget" version 1.5.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
113 characters long description:
Adds a text-like widget that allows you to write shortcode in it. (Just whats missing in the default text widget)

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
Good job! No executable or dangerous file extensions detected112 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP437170112

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.50
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected