78% customer-reviews-collector-for-woocommerce

Code Review | Customer Reviews Collector for WooCommerce

WordPress plugin Customer Reviews Collector for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: customer-reviews-...
  • Plugin version: 4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Jul 29, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 28
  • Update frequency: every 17.3 days
  • Top authors: trustindex (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active /30,487 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.26MB] [CPU: ▼8.78ms] Passed 4 tests

Analyzing server-side resources used by Customer Reviews Collector for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3842.89 ▼1.95
Dashboard /wp-admin3.54 ▲0.1945.27 ▼19.58
Posts /wp-admin/edit.php3.64 ▲0.2848.20 ▲2.53
Add New Post /wp-admin/post-new.php6.22 ▲0.3377.57 ▼13.98
Media Library /wp-admin/upload.php3.48 ▲0.2537.00 ▲0.39
Customer Reviews Collector New /wp-admin/admin.php?page=customer-reviews-collector-for-woocommerce/admin.php3.4229.53

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 102 new files
Database: 2 new tables, 9 new options
New tables
wp_trustindex_collector_unsubscribes
wp_trustindex_collector_schedule_list
New WordPress options
trustindex-collector-update-version-check
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
trustindex-collector-version
widget_recent-posts
widget_recent-comments
trustindex-collector-active

Browser metrics Passed 4 tests

Checking browser requirements for Customer Reviews Collector for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5714.30 ▼0.041.78 ▼0.1442.14 ▼1.14
Dashboard /wp-admin2,206 ▲315.64 ▼0.0495.42 ▼11.4240.33 ▼1.25
Posts /wp-admin/edit.php2,114 ▲142.07 ▲0.0837.92 ▲2.1736.59 ▲5.67
Add New Post /wp-admin/post-new.php1,535 ▲923.83 ▲0.75672.96 ▲67.3858.12 ▲8.21
Media Library /wp-admin/upload.php1,405 ▲54.24 ▲0.0798.33 ▼7.9942.68 ▼0.13
Customer Reviews Collector New /wp-admin/admin.php?page=customer-reviews-collector-for-woocommerce/admin.php6752.1819.9119.30

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
The following issues need your attention
  • 10× PHP files output text when accessed directly:
    • > /wp-content/plugins/customer-reviews-collector-for-woocommerce/admin.php
    • > /wp-content/plugins/customer-reviews-collector-for-woocommerce/tabs/requests.php
    • > /wp-content/plugins/customer-reviews-collector-for-woocommerce/tabs/unsubscribes.php
    • > /wp-content/plugins/customer-reviews-collector-for-woocommerce/tabs/settings.php
    • > /wp-content/plugins/customer-reviews-collector-for-woocommerce/tabs/troubleshooting.php
    • > /wp-content/plugins/customer-reviews-collector-for-woocommerce/tabs/feature_request.php
    • > /wp-content/plugins/customer-reviews-collector-for-woocommerce/customer-reviews-collector-for-woocommerce.php
    • > /wp-content/plugins/customer-reviews-collector-for-woocommerce/tabs/dashboard.php
    • > /wp-content/plugins/customer-reviews-collector-for-woocommerce/tabs/display_reviews.php
    • > /wp-content/plugins/customer-reviews-collector-for-woocommerce/include/email.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/customer-reviews-collector-for-woocommerce/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/customer-reviews-collector-for-woocommerce/uninstall.php:2
    • > PHP Notice
      Undefined variable: tiEmailContent in wp-content/plugins/customer-reviews-collector-for-woocommerce/include/email.php on line 113
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/customer-reviews-collector-for-woocommerce/include/update.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/customer-reviews-collector-for-woocommerce/include/update.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'TrustindexCollectorPlugin' not found in wp-content/plugins/customer-reviews-collector-for-woocommerce/include/pagination.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/customer-reviews-collector-for-woocommerce/include/activate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/customer-reviews-collector-for-woocommerce/include/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_plugin_file_url() on null in wp-content/plugins/customer-reviews-collector-for-woocommerce/include/feedback.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/customer-reviews-collector-for-woocommerce/include/troubleshooting.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
Attributes that need to be fixed: The official readme.txt might help

customer-reviews-collector-for-woocommerce/customer-reviews-collector-for-woocommerce.php Passed 13 tests

The entry point to "Customer Reviews Collector for WooCommerce" version 4.0 is a PHP file that has certain tags in its header comment area
117 characters long description:
Collect reviews on Google, Facebook, Yelp, Trustindex and other platforms automatically, with the help of our system.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin3,272 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP1930522,464
JavaScript3238102771
SVG12035
CSS1002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity60.00
▷ Minimum class complexity60.00
▷ Maximum class complexity60.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods44
▷ Static methods24.55%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions18.33%
▷ Anonymous functions1191.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/trustindex-sign-logo.png3.34KB0.59KB▼ 82.47%