69% rivio-reviews-for-woocommerce

Code Review | RIVIO for WooCommerce

WordPress plugin RIVIO for WooCommerce scored69%from 54 tests.

About plugin

  • Plugin page: rivio-reviews-for...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Feb 1, 2016
  • Latest release: Oct 24, 2016
  • Number of updates: 26
  • Update frequency: every 10.3 days
  • Top authors: Rivio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,050 total downloads

Benchmarks

Plugin footprint 48% 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.14MB] [CPU: ▼1.14ms] Passed 4 tests

A check of server-side resources used by RIVIO for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.99 ▲3.77
Dashboard /wp-admin3.46 ▲0.1646.84 ▼2.34
Posts /wp-admin/edit.php3.58 ▲0.2245.31 ▲0.88
Add New Post /wp-admin/post-new.php6.05 ▲0.1683.55 ▼6.88
Media Library /wp-admin/upload.php3.39 ▲0.1638.86 ▲4.89

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for RIVIO for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.32 ▼1.054.68 ▲3.0743.48 ▲2.03
Dashboard /wp-admin2,223 ▲415.89 ▼0.02108.08 ▲1.8138.44 ▼5.89
Posts /wp-admin/edit.php2,106 ▲172.02 ▲0.0032.71 ▼3.2034.03 ▲1.88
Add New Post /wp-admin/post-new.php1,543 ▲2923.18 ▲5.56646.99 ▲4.8856.73 ▼16.60
Media Library /wp-admin/upload.php1,408 ▲174.19 ▼0.0899.92 ▲3.5942.85 ▼0.93

Uninstaller [IO: ▲2.32MB] [DB: ▲0.00MB] 25% 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
  • Uninstall procedure validation failed for this plugin
    • > Compile error in wp-content/plugins/rivio-reviews-for-woocommerce/uninstall.php+8
    Cannot redeclare rivio_get_default_settings() (previously declared in wp-content/plugins/rivio-reviews-for-woocommerce/rivio.php:55)
  • This plugin has failed uninstalling correctly, leaving 26 files (2.32MB) in the plugin directory
    • (new file) assets/css/side-menu-logo.css
    • (new file) assets/images/preview-tab.png
    • (new file) assets/images/logo.png
    • (new file) assets/css/rivio.css
    • (new file) assets/images/preview-custom.png
    • (new file) assets/images/preview-footer.png
    • (new file) assets/images/animations/testimonial.gif
    • (new file) assets/images/animations/seller-badge.gif
    • (new file) assets/images/badge.png
    • (new file) assets/images/logo_small.png
    • ...
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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 to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Rivio embed module.), #2 (Rivio embed module.), #3 (Post-Purchase emails)
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

rivio-reviews-for-woocommerce/rivio.php 92% from 13 tests

"RIVIO for WooCommerce" version 1.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 ("rivio-reviews-for-woocommerce.php" instead of "rivio.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,374 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP428770975
HTML21512290
CSS218088
JavaScript22016
SVG1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.40MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/preview-footer.png27.13KB11.41KB▼ 57.96%
assets/images/logo.png1.38KB1.51KB0.00%
screenshot-3.png80.96KB29.04KB▼ 64.13%
assets/images/preview-custom.png26.86KB11.17KB▼ 58.40%
assets/images/testimonial.png13.54KB5.71KB▼ 57.79%