90% shortcodes-for-woocommerce

Code Review | Shortcodes for WooCommerce

WordPress plugin Shortcodes for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: shortcodes-for-wo...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 6.3.1
  • First release: Nov 13, 2015
  • Latest release: Oct 15, 2016
  • Number of updates: 21
  • Update frequency: every 16.1 days
  • Top authors: s3rgiosan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /4,380 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼8.98ms] Passed 4 tests

This is a short check of server-side resources used by Shortcodes for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.83 ▼3.33
Dashboard /wp-admin3.38 ▲0.0448.26 ▼16.15
Posts /wp-admin/edit.php3.49 ▲0.1453.23 ▲0.62
Add New Post /wp-admin/post-new.php5.96 ▲0.0893.35 ▼12.25
Media Library /wp-admin/upload.php3.30 ▲0.0836.68 ▼4.18

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/shortcodes-for-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Shortcodes for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.58 ▼0.751.76 ▼0.0941.95 ▲1.60
Dashboard /wp-admin2,218 ▲124.85 ▼0.03111.77 ▼0.0541.39 ▼0.35
Posts /wp-admin/edit.php2,100 ▼02.06 ▲0.0435.99 ▼3.1029.22 ▼6.56
Add New Post /wp-admin/post-new.php1,545 ▼023.00 ▼0.45677.91 ▼42.8150.34 ▼2.65
Media Library /wp-admin/upload.php1,403 ▲34.35 ▲0.09100.63 ▼2.9442.69 ▼3.96

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: shortcode, category, woocommerce, product, featured

shortcodes-for-woocommerce/shortcodes-for-woocommerce.php Passed 13 tests

The main PHP file in "Shortcodes for WooCommerce" ver. 1.2.3 adds more information about the plugin and also serves as the entry point for this plugin
34 characters long description:
Useful shortcodes for WooCommerce.

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
Good job! No executable or dangerous file extensions detected546 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP11124305507
Markdown111022
XML15216
JSON1001

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.34
Average class complexity11.80
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods32
▷ Static methods39.38%
▷ Public methods2887.50%
▷ Protected methods00.00%
▷ Private methods412.50%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected