58% more-better-reviews-for-woocommerce

Code Review | Get Better Reviews for WooCommerce

WordPress plugin Get Better Reviews for WooCommerce scored 58% from 54 tests.

About plugin

  • Plugin page: more-better-revie...
  • Plugin version: 3.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 5.8.1
  • First release: Oct 6, 2019
  • Latest release: Mar 12, 2022
  • Number of updates: 139
  • Update frequency: every 6.4 days
  • Top authors: Tobias_Conrad (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 1,921 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.78MB] [CPU: ▼108.92ms] 75% from 4 tests

This is a short check of server-side resources used by Get Better Reviews for WooCommerce
It is recommended to improve the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.78MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.89 ▲6.0567.30 ▲39.79
Dashboard /wp-admin8.90 ▲5.8488.48 ▲47.84
Posts /wp-admin/edit.php8.90 ▲5.7980.43 ▲40.97
Add New Post /wp-admin/post-new.php11.06 ▲5.61112.68 ▼551.91
Media Library /wp-admin/upload.php8.90 ▲5.9062.93 ▲35.49
Freemius Debug [v.2.5.0.1] /wp-admin/admin.php?page=freemius8.9066.77

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 317 new files
Database: 2 new tables, 13 new options
New tables
wp_wp2lwtsr_reviews
wp_wp2lwtsr_reviewmeta
New WordPress options
fs_accounts
wtsr_limit_users
wtsr_db_version
fs_gdpr
wtsr_check_ts_credentials_empty
fs_debug_mode
wtsr_3_0_0_update
wtsr_check_trustpilot_credentials_empty
wtsr_limit_days
wtsr_version
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Get Better Reviews for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,857 ▲25616.09 ▲0.298.25 ▲3.2575.92 ▲0.99
Dashboard /wp-admin3,006 ▲1116.11 ▼0.19135.14 ▼3.22198.47 ▲25.67
Posts /wp-admin/edit.php2,818 ▲753.37 ▲0.1466.10 ▲2.02157.55 ▲19.05
Add New Post /wp-admin/post-new.php1,928 ▼1,77815.94 ▼3.14396.38 ▼32.57156.45 ▼6.07
Media Library /wp-admin/upload.php1,824 ▲755.58 ▲0.07150.62 ▲4.30201.28 ▲18.17
Freemius Debug [v.2.5.0.1] /wp-admin/admin.php?page=freemius1,5122.5455.87110.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/more-better-reviews-for-woocommerce/freemius/includes/class-freemius.php+8911
    Undefined property: stdClass::$plugins
  • Zombie tables were found after uninstall: 2 tables
    • wp_wp2lwtsr_reviews
    • wp_wp2lwtsr_reviewmeta
  • Zombie WordPress options detected upon uninstall: 13 options
    • fs_debug_mode
    • wtsr_check_ts_credentials_empty
    • wtsr_db_version
    • wtsr_limit_users
    • wtsr_limit_days
    • fs_gdpr
    • wtsr_woocommerce_only_mode_enabled
    • wtsr_3_0_0_update
    • fs_accounts
    • wtsr_limit_message
    • ...

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 0% from 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
Almost there! Just fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/more-better-reviews-for-woocommerce/public/partials/wtsr-public-display.php
    • > /wp-content/plugins/more-better-reviews-for-woocommerce/admin/partials/welcome-page/wizard-tutorial-de.php
    • > /wp-content/plugins/more-better-reviews-for-woocommerce/admin/partials/welcome-page/tutorial-de.php
    • > /wp-content/plugins/more-better-reviews-for-woocommerce/admin/partials/welcome-page/wizard-tutorial-en.php
    • > /wp-content/plugins/more-better-reviews-for-woocommerce/admin/partials/welcome-page/tutorial-en.php
  • 24× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/more-better-reviews-for-woocommerce/includes/lib/Wtsr_Required_Plugins.php:164
    • > PHP Fatal error
      Uncaught Error: Class 'Wtsr_License' not found in wp-content/plugins/more-better-reviews-for-woocommerce/admin/partials/wtsr-admin-wizard-block-license_warning.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/more-better-reviews-for-woocommerce/admin/partials/wtsr-admin-generate-order-reviews-table.php:12
    • > PHP Notice
      Undefined variable: mysql_orders in wp-content/plugins/more-better-reviews-for-woocommerce/admin/partials/wtsr-admin-generate-order-reviews-table-list.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/more-better-reviews-for-woocommerce/templates/emails/plain/wc-customer-review-thankyou.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/more-better-reviews-for-woocommerce/admin/partials/blocks/available-shortcodes-list.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'TSManager' not found in wp-content/plugins/more-better-reviews-for-woocommerce/public/partials/shortcodes/woo_review_page.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/more-better-reviews-for-woocommerce/includes/class-wtsr-rest.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/more-better-reviews-for-woocommerce/public/partials/shortcodes/woo_review_page_empty.php:7
    • > PHP Notice
      Undefined variable: order in wp-content/plugins/more-better-reviews-for-woocommerce/templates/emails/plain/wc-customer-review-request.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 22 tag instead of maximum 10
You can take inspiration from this readme.txt

more-better-reviews-for-woocommerce/more-better-reviews-for-woocommerce.php Passed 13 tests

"Get Better Reviews for WooCommerce" version 3.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
97 characters long description:
Get Better Reviews for WooCommerce is an automated reviews request system for WooCommerce reviews

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected72,136 lines of code in 243 files:
LanguageFilesBlank linesComment linesLines of code
PHP20111,37418,59747,827
PO File148,14710,27318,864
CSS16290762,958
JavaScript84211222,124
Markdown21220318
JSON20045

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,029)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity63.58
▷ Minimum class complexity1.00
▷ Maximum class complexity3,029.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes91
▷ Abstract classes55.49%
▷ Concrete classes8694.51%
▷ Final classes00.00%
Methods1,657
▷ Static methods40524.44%
▷ Public methods1,23774.65%
▷ Protected methods553.32%
▷ Private methods36522.03%
Functions114
▷ Named functions114100.00%
▷ Anonymous functions00.00%
Constants136
▷ Global constants10476.47%
▷ Class constants3223.53%
▷ Public constants32100.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
26 PNG files occupy 0.17MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
admin/img/three_star.png1.33KB0.78KB▼ 41.15%
public/img/star-gray.png1.58KB0.84KB▼ 46.70%
admin/img/icon-woocommerce.png4.06KB2.05KB▼ 49.52%
admin/img/one_star.png1.33KB0.78KB▼ 41.28%