78% uws-unyson-woocommerce-shortcodes

Code Review | Unyson WooComerce Shortcodes

WordPress plugin Unyson WooComerce Shortcodes scored78%from 54 tests.

About plugin

  • Plugin page: uws-unyson-woocom...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5
  • WordPress version: 6.3.1
  • First release: Dec 18, 2017
  • Latest release: Aug 15, 2020
  • Number of updates: 9
  • Update frequency: every 108.7 days
  • Top authors: flytemplates (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /13,182 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼11.41ms] Passed 4 tests

This is a short check of server-side resources used by Unyson WooComerce Shortcodes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.72 ▼4.72
Dashboard /wp-admin3.32 ▼0.0351.74 ▼14.43
Posts /wp-admin/edit.php3.37 ▲0.0152.07 ▼2.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.23 ▼23.59
Media Library /wp-admin/upload.php3.24 ▲0.0139.64 ▲5.58

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 79 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Unyson WooComerce Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.28 ▼0.961.76 ▲0.0344.58 ▲0.54
Dashboard /wp-admin2,227 ▲395.82 ▲0.95105.91 ▼8.5480.83 ▲37.58
Posts /wp-admin/edit.php2,128 ▲392.18 ▲0.1540.02 ▼1.1236.27 ▼1.86
Add New Post /wp-admin/post-new.php1,560 ▲1518.26 ▼0.15707.51 ▲68.5563.82 ▼2.99
Media Library /wp-admin/upload.php1,412 ▲274.23 ▲0.02101.33 ▼6.9071.34 ▲21.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 32× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/uws-unyson-woocommerce-shortcodes/extensions/uws/shortcodes/uws_checkout/options.php
    • > /wp-content/plugins/uws-unyson-woocommerce-shortcodes/extensions/uws/shortcodes/uws_products/config.php
    • > /wp-content/plugins/uws-unyson-woocommerce-shortcodes/extensions/uws/shortcodes/uws_cart/views/view.php
    • > /wp-content/plugins/uws-unyson-woocommerce-shortcodes/extensions/uws/shortcodes/uws_cart/static.php
    • > /wp-content/plugins/uws-unyson-woocommerce-shortcodes/extensions/uws/shortcodes/uws_add_to_cart/views/view.php
    • > /wp-content/plugins/uws-unyson-woocommerce-shortcodes/extensions/uws/shortcodes/uws_related_products/views/view.php
    • > /wp-content/plugins/uws-unyson-woocommerce-shortcodes/extensions/uws/shortcodes/uws_product_page/views/view.php
    • > /wp-content/plugins/uws-unyson-woocommerce-shortcodes/extensions/uws/shortcodes/uws_related_products/config.php
    • > /wp-content/plugins/uws-unyson-woocommerce-shortcodes/extensions/uws/shortcodes/uws_product_page/options.php
    • > /wp-content/plugins/uws-unyson-woocommerce-shortcodes/extensions/uws/shortcodes/uws_product_page/static.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uws-unyson-woocommerce-shortcodes/uws.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/uws-unyson-woocommerce-shortcodes/includes/helpers.php:76

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: add to cart shortcode, woocommerce, products shortcode, shortcodes, unyson

uws-unyson-woocommerce-shortcodes/uws.php 85% from 13 tests

Analyzing the main PHP file in "Unyson WooComerce Shortcodes" version 1.0.3
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("uws-unyson-woocommerce-shortcodes.php" instead of "uws.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
Good job! No executable or dangerous file extensions detected471 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP264923460
CSS13211

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
extensions/uws/shortcodes/uws_order_tracking/static/img/page_builder.png1.14KB0.29KB▼ 74.79%
extensions/uws/shortcodes/uws_my_account/static/img/page_builder.png1.14KB0.29KB▼ 74.79%
extensions/uws/shortcodes/uws_add_to_cart/static/img/page_builder.png1.14KB0.29KB▼ 74.79%
extensions/uws/shortcodes/uws_checkout/static/img/page_builder.png1.14KB0.29KB▼ 74.79%
extensions/uws/shortcodes/uws_related_products/static/img/page_builder.png1.14KB0.29KB▼ 74.79%