84% widget-to-shortcode

Code Review | Widget to Shortcode

WordPress plugin Widget to Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: widget-to-shortcode
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-4.2.2
  • WordPress version: 6.3.1
  • First release: May 23, 2015
  • Latest release: May 27, 2015
  • Number of updates: 9
  • Update frequency: every 0.6 days
  • Top authors: akosicb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,547 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.52ms] Passed 4 tests

Analyzing server-side resources used by Widget to Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.88 ▼0.56
Dashboard /wp-admin3.32 ▲0.0241.79 ▼6.28
Posts /wp-admin/edit.php3.37 ▲0.0242.80 ▼9.26
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.81 ▲6.52
Media Library /wp-admin/upload.php3.24 ▲0.0233.94 ▼1.96

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Widget to Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.72 ▼0.662.19 ▲0.5443.83 ▲3.68
Dashboard /wp-admin2,209 ▲235.89 ▲0.96104.42 ▼10.5342.93 ▲0.74
Posts /wp-admin/edit.php2,156 ▲672.02 ▼0.0334.19 ▼7.2434.09 ▼1.42
Add New Post /wp-admin/post-new.php1,594 ▲6618.15 ▲0.01607.66 ▲15.8557.71 ▼3.92
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0199.00 ▼2.7344.22 ▼2.54

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/widget-to-shortcode/lib/display/wts-view.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/widget-to-shortcode/widget_to_shortcode.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: widget as shortcode, convert widget to shortcode, widgets, shortcode, widgets to shortcode

widget-to-shortcode/widget_to_shortcode.php 92% from 13 tests

The primary PHP file in "Widget to Shortcode" version 1.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("widget-to-shortcode.php" instead of "widget_to_shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin167 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP31911100
CSS13148
JavaScript13119

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

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