83% woo-guaranteed-reviews-company

Code Review | Guaranteed Reviews Company (Société des Avis Garantis)

WordPress plugin Guaranteed Reviews Company (Société des Avis Garantis) scored83%from 54 tests.

About plugin

  • Plugin page: woo-guaranteed-re...
  • Plugin version: 1.2.5
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 15, 2019
  • Latest release: Aug 22, 2022
  • Number of updates: 57
  • Update frequency: every 23.1 days
  • Top authors: nicolas2d (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active /7,809 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.21MB] [CPU: ▼7.08ms] Passed 4 tests

A check of server-side resources used by Guaranteed Reviews Company (Société des Avis Garantis)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2336.80 ▲0.10
Dashboard /wp-admin3.57 ▲0.2246.78 ▼16.18
Posts /wp-admin/edit.php3.62 ▲0.2646.35 ▼0.49
Add New Post /wp-admin/post-new.php6.09 ▲0.2084.13 ▼11.75
Media Library /wp-admin/upload.php3.43 ▲0.2037.88 ▲4.33

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 62 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
woocommerce_enable_review_rating
widget_theysaidso_widget
woocommerce_enable_reviews

Browser metrics Passed 4 tests

Guaranteed Reviews Company (Société des Avis Garantis): an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7114.23 ▼0.121.82 ▲0.3341.24 ▲3.22
Dashboard /wp-admin2,192 ▲115.55 ▼0.1683.00 ▼19.3743.93 ▲4.01
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0633.52 ▼2.5932.29 ▼1.10
Add New Post /wp-admin/post-new.php1,529 ▲323.27 ▲0.12649.00 ▲3.5765.29 ▲15.21
Media Library /wp-admin/upload.php1,403 ▲64.14 ▼0.0796.23 ▼14.2640.96 ▼5.89

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • woocommerce_enable_reviews
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • woocommerce_enable_review_rating

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)
Good news, no errors were detected

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
Please fix the following
  • 30× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      include_once(WC_SAG_PLUGIN_DIRinc/class-wc-sag-frontend-loop-rating.php): failed to open stream: No such file or directory in wp-content/plugins/woo-guaranteed-reviews-company/inc/class-wc-sag-frontend.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_SAG_API_Abstract_Route' not found in wp-content/plugins/woo-guaranteed-reviews-company/inc/class-wc-sag-api-config.php:3
    • > PHP Warning
      include_once(WC_SAG_PLUGIN_DIRinc/class-wc-sag-shortcode-summary.php): failed to open stream: No such file or directory in wp-content/plugins/woo-guaranteed-reviews-company/inc/class-wc-sag-frontend.php on line 8
    • > PHP Warning
      Use of undefined constant WC_SAG_PLUGIN_DIR - assumed 'WC_SAG_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-guaranteed-reviews-company/inc/class-wc-sag-frontend.php on line 5
    • > PHP Warning
      include_once(): Failed opening 'WC_SAG_PLUGIN_DIRinc/class-wc-sag-frontend-structured-data.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/woo-guaranteed-reviews-company/inc/class-wc-sag-frontend.php on line 4
    • > PHP Warning
      Use of undefined constant WC_SAG_PLUGIN_DIR - assumed 'WC_SAG_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-guaranteed-reviews-company/inc/class-wc-sag-frontend.php on line 9
    • > PHP Warning
      Use of undefined constant WC_SAG_PLUGIN_DIR - assumed 'WC_SAG_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-guaranteed-reviews-company/inc/class-wc-sag-frontend.php on line 4
    • > PHP Warning
      include_once(): Failed opening 'WC_SAG_PLUGIN_DIRinc/class-wc-sag-frontend-loop-rating.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/woo-guaranteed-reviews-company/inc/class-wc-sag-frontend.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_SAG_API_Abstract_Route' not found in wp-content/plugins/woo-guaranteed-reviews-company/inc/class-wc-sag-api-order-export.php:3
    • > PHP Warning
      include_once(): Failed opening 'WC_SAG_PLUGIN_DIRinc/class-wc-sag-widget-iframe.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/woo-guaranteed-reviews-company/inc/class-wc-sag-frontend.php on line 5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

woo-guaranteed-reviews-company/woocommerce-sag.php 92% from 13 tests

The main file in "Guaranteed Reviews Company (Société des Avis Garantis)" v. 1.2.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-guaranteed-reviews-company.php" instead of "woocommerce-sag.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected2,578 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP263013731,397
PO File4288304838
CSS17315317
JavaScript191326

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.36
Average class complexity9.59
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes15.88%
▷ Concrete classes1694.12%
▷ Final classes00.00%
Methods69
▷ Static methods00.00%
▷ Public methods4565.22%
▷ Protected methods2434.78%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
23 PNG files occupy 0.26MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-fr.png5.06KB2.75KB▼ 45.57%
assets/images/0star.png0.93KB0.77KB▼ 17.18%
assets/images/ico_user.png1.67KB1.57KB▼ 5.68%
assets/images/steavisgarantis_logo_en.png14.21KB6.21KB▼ 56.34%
assets/images/5star.png1.44KB0.96KB▼ 33.36%