78% ryviu

Code Review | Ryviu - Product Reviews for WooCommerce

WordPress plugin Ryviu - Product Reviews for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: ryviu
  • Plugin version: 3.1.24
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2017
  • Latest release: Sep 20, 2023
  • Number of updates: 165
  • Update frequency: every 14.2 days
  • Top authors: ryviu (100%)

Code review

54 tests

User reviews

38 reviews

Install metrics

6,000+ active /73,050 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
Installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼7.17ms] Passed 4 tests

Server-side resources used by Ryviu - Product Reviews for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3441.95 ▼9.50
Dashboard /wp-admin3.66 ▲0.3549.54 ▼8.66
Posts /wp-admin/edit.php3.71 ▲0.3548.05 ▲0.50
Add New Post /wp-admin/post-new.php6.20 ▲0.3190.69 ▼11.00
Media Library /wp-admin/upload.php3.52 ▲0.2939.97 ▲1.23
Ryviu /wp-admin/options-general.php?page=ryviu-setting-admin3.4932.54

Server storage [IO: ▲0.11MB] [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: 23 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
ryviu_settings_reviews
widget_recent-posts
ryviu_frr_status
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Ryviu - Product Reviews for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲6114.26 ▼0.371.54 ▼0.6340.39 ▼6.49
Dashboard /wp-admin2,247 ▲675.61 ▲0.01100.40 ▲8.5681.09 ▲41.82
Posts /wp-admin/edit.php2,162 ▲622.06 ▲0.0835.03 ▼2.1131.87 ▼1.54
Add New Post /wp-admin/post-new.php1,735 ▲20722.49 ▼0.53721.70 ▲49.0154.35 ▼5.26
Media Library /wp-admin/upload.php1,458 ▲554.25 ▲0.07102.28 ▼17.0283.22 ▲33.53
Ryviu /wp-admin/options-general.php?page=ryviu-setting-admin1,2641.8734.0365.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • ryviu_frr_status
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ryviu/ajax.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ryviu/includes/settings.php:390
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ryviu/includes/woo-hooks.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ryviu/includes/ajax-handle.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ryviu/includes/functions.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ryviu/includes/json-api.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in ryviu/assets to your readme.txt
The official readme.txt is a good inspiration

ryviu/ryviu.php Passed 13 tests

"Ryviu - Product Reviews for WooCommerce" version 3.1.24's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
95 characters long description:
Display reviews in product page for woocommerce, manager data and get from https://app.ryviu.io

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
Good job! No executable or dangerous file extensions detected2,159 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP123884091,611
CSS3833455
JavaScript4141493

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity25.17
▷ Minimum class complexity8.00
▷ Maximum class complexity43.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods68
▷ Static methods1623.53%
▷ Public methods6494.12%
▷ Protected methods00.00%
▷ Private methods45.88%
Functions37
▷ Named functions3697.30%
▷ Anonymous functions12.70%
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
There were not PNG files found in your plugin