77% reviewscouk-for-woocommerce

Code Review | REVIEWS.io WooCommerce Plugin

WordPress plugin REVIEWS.io WooCommerce Plugin scored77%from 54 tests.

About plugin

  • Plugin page: reviewscouk-for-w...
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 26, 2016
  • Latest release: Nov 20, 2023
  • Number of updates: 176
  • Update frequency: every 15.6 days
  • Top authors: reviewscouk (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /31,605 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 gracefully, with no errors

Server metrics [RAM: ▲0.36MB] [CPU: ▲14.75ms] Passed 4 tests

This is a short check of server-side resources used by REVIEWS.io WooCommerce Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3344.62 ▲3.60
Dashboard /wp-admin3.69 ▲0.3468.23 ▲4.67
Posts /wp-admin/edit.php3.81 ▲0.4474.49 ▲26.15
Add New Post /wp-admin/post-new.php6.27 ▲0.38115.27 ▲25.10
Media Library /wp-admin/upload.php3.63 ▲0.4063.37 ▲25.62
REVIEWS.io /wp-admin/options-general.php?page=reviewscouk4.0065.75

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 27 new options
New WordPress options
db_upgraded
widget_recent-posts
REVIEWSio_send_product_review_invitation
REVIEWSio_enable_rating_snippet_listen_for_changes
REVIEWSio_product_feed_cron_frequency
widget_recent-comments
theysaidso_admin_options
REVIEWSio_rating_snippet_no_linebreak
REVIEWSio_new_variables_set
REVIEWSio_minimum_rating
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for REVIEWS.io WooCommerce Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7414.67 ▼0.061.91 ▲0.2145.27 ▲4.74
Dashboard /wp-admin2,199 ▲245.58 ▼0.1489.83 ▼25.8540.33 ▼7.48
Posts /wp-admin/edit.php2,107 ▲101.94 ▼0.0041.16 ▲3.2436.76 ▲0.46
Add New Post /wp-admin/post-new.php1,529 ▲123.16 ▲0.38597.46 ▼65.9449.11 ▼6.80
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.01101.61 ▼9.4743.01 ▼5.23
REVIEWS.io /wp-admin/options-general.php?page=reviewscouk4,1112.1248.8769.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 27 options
    • REVIEWSio_current_product_feed_cron_frequency
    • REVIEWSio_disable_elementor_blocks
    • can_compress_scripts
    • db_upgraded
    • REVIEWSio_minimum_rating
    • widget_recent-comments
    • theysaidso_admin_options
    • REVIEWSio_reviews_tab_name
    • REVIEWSio_disable_rating_snippet_popup
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/reviewscouk-for-woocommerce/includes/elementor-widgets/rating-bar.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/reviewscouk-for-woocommerce/includes/elementor-widgets/product-reviews.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/reviewscouk-for-woocommerce/includes/elementor-widgets/carousel.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/reviewscouk-for-woocommerce/includes/elementor-widgets/rating-snippet.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/reviewscouk-for-woocommerce/includes/elementor-widgets/ugc.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/reviewscouk-for-woocommerce/includes/elementor-widgets/nuggets.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=reviewscouk
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=reviewscouk - Access to XMLHttpRequest at 'https://api.reviews.io/widget/list-with-key?store=&widget=nuggets,floating,ugc,survey,rating-bar&selected_widget=&url_key=&1700904721248' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/options-general.php?page=reviewscouk
    • > Network (severe)
    https://api.reviews.io/widget/list-with-key?store=&widget=nuggets,floating,ugc,survey,rating-bar&selected_widget=&url_key=&1700904721248 - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/options-general.php?page=reviewscouk
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=reviewscouk - Access to XMLHttpRequest at 'https://api.reviews.io/woocommerce/info?store=&1700904721245' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/options-general.php?page=reviewscouk
    • > Network (severe)
    https://api.reviews.io/woocommerce/info?store=&1700904721245 - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/options-general.php?page=reviewscouk
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=reviewscouk - Access to XMLHttpRequest at 'https://api.reviews.io/widget/survey-campaigns?store=&1700904721247' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/options-general.php?page=reviewscouk
    • > Network (severe)
    https://api.reviews.io/widget/survey-campaigns?store=&1700904721247 - Failed to load resource: net::ERR_FAILED

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #9 (REVIEWS.io Integration)
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
Please take inspiration from this readme.txt

reviewscouk-for-woocommerce/woocommerce-reviews.php 85% from 13 tests

The entry point to "REVIEWS.io WooCommerce Plugin" version 1.2.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("reviewscouk-for-woocommerce.php" instead of "woocommerce-reviews.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 182 characters long)

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
Success! There were no dangerous files found in this plugin6,640 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP137893086,069
JavaScript2623381
CSS118199
SVG10177
Markdown113014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity31.38
▷ Minimum class complexity1.00
▷ Maximum class complexity244.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods137
▷ Static methods32.19%
▷ Public methods10778.10%
▷ Protected methods2820.44%
▷ Private methods21.46%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
13 compressed PNG files occupy 2.84MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png3.50KB3.85KB0.00%
assets/screenshot-1.png410.37KB467.26KB0.00%
assets/screenshot-5.png349.17KB394.82KB0.00%
assets/banner-1544x500.png196.71KB220.93KB0.00%
assets/screenshot-6.png382.67KB435.66KB0.00%