83% better-reviews-for-woocommerce

Code Review | Better Product Reviews For WooCommerce

WordPress plugin Better Product Reviews For WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: better-reviews-fo...
  • Plugin version: 0.4.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-5.5.0
  • WordPress version: 6.3.1
  • First release: Apr 8, 2019
  • Latest release: Aug 20, 2020
  • Number of updates: 8
  • Update frequency: every 63.8 days
  • Top authors: norcross (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

50+ active /2,330 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.05ms] Passed 4 tests

This is a short check of server-side resources used by Better Product Reviews For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.03 ▲1.64
Dashboard /wp-admin3.31 ▲0.0049.65 ▼3.95
Posts /wp-admin/edit.php3.36 ▲0.0049.32 ▲0.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.04 ▼7.46
Media Library /wp-admin/upload.php3.23 ▲0.0037.70 ▼1.11

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Better Product Reviews For WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.33 ▼1.294.35 ▲2.1941.36 ▼0.79
Dashboard /wp-admin2,209 ▲205.88 ▼0.05105.15 ▼12.2140.30 ▼2.61
Posts /wp-admin/edit.php2,089 ▲32.00 ▲0.0139.45 ▲0.9833.92 ▼2.52
Add New Post /wp-admin/post-new.php1,533 ▲1423.09 ▼0.07658.82 ▼33.2156.93 ▲6.83
Media Library /wp-admin/upload.php1,385 ▼34.17 ▲0.02100.70 ▼9.0047.01 ▼0.71

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 20× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nexcess\\WooBetterReviews\\Admin\\MenuItems\\add_filter() in wp-content/plugins/better-reviews-for-woocommerce/includes/admin/menu-items.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nexcess\\WooBetterReviews\\WooFilters\\add_filter() in wp-content/plugins/better-reviews-for-woocommerce/includes/woo/filters.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/better-reviews-for-woocommerce/includes/process/cli-commands.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nexcess\\WooBetterReviews\\Admin\\ProductMeta\\add_action() in wp-content/plugins/better-reviews-for-woocommerce/includes/admin/product-meta.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nexcess\\WooBetterReviews\\FrontEnd\\add_filter() in wp-content/plugins/better-reviews-for-woocommerce/includes/front-end.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nexcess\\WooBetterReviews\\Database\\add_action() in wp-content/plugins/better-reviews-for-woocommerce/includes/database.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nexcess\\WooBetterReviews\\Uninstall\\register_uninstall_hook() in wp-content/plugins/better-reviews-for-woocommerce/includes/uninstall.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nexcess\\WooBetterReviews\\SchemaMarkup\\add_filter() in wp-content/plugins/better-reviews-for-woocommerce/includes/display/schema-markup.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nexcess\\WooBetterReviews\\FormProcess\\add_action() in wp-content/plugins/better-reviews-for-woocommerce/includes/process/form-process.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nexcess\\WooBetterReviews\\Deactivate\\register_deactivation_hook() in wp-content/plugins/better-reviews-for-woocommerce/includes/deactivate.php:31

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)
Everything seems fine on the user side


Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (**WooCommerce Settings** - Set the options for reviews) image missing
You can take inspiration from this readme.txt

better-reviews-for-woocommerce/woo-better-reviews.php 77% from 13 tests

This is the main PHP file of "Better Product Reviews For WooCommerce" version 0.4.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("better-reviews-for-woocommerce.php" instead of "woo-better-reviews.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.2" instead of "4.2.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin8,403 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity59.40
▷ Minimum class complexity20.00
▷ Maximum class complexity144.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4739.83%
▷ Protected methods5344.92%
▷ Private methods1815.25%
▷ Named functions272100.00%
▷ Anonymous functions00.00%
▷ Global constants20100.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
No PNG images were found in this plugin