10% wooreviews-importer

Code Review | IRivYou - Add reviews from AliExpress and Amazon to woocommerce

WordPress plugin IRivYou - Add reviews from AliExpress and Amazon to woocommerce scored10%from 54 tests.

About plugin

  • Plugin page: wooreviews-importer
  • Plugin version: 2.2.1
  • PHP compatiblity: 5.6.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2020
  • Latest release: Sep 12, 2023
  • Number of updates: 115
  • Update frequency: every 11.7 days
  • Top authors: zizou1988 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /30,400 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/wooreviews-importer/WooreviewsImporter_Plugin.php+33
    Undefined offset: 1

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

An overview of server-side resources used by IRivYou - Add reviews from AliExpress and Amazon to woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2535.14 ▼2.89
Dashboard /wp-admin3.61 ▲0.3044.81 ▼1.64
Posts /wp-admin/edit.php3.66 ▲0.3048.21 ▼1.99
Add New Post /wp-admin/post-new.php6.15 ▲0.2694.35 ▲2.10
Media Library /wp-admin/upload.php3.47 ▲0.2438.86 ▲1.76

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 11 new options
New WordPress options
WooreviewsImporter_Plugin_CanDoSomething
db_upgraded
theysaidso_admin_options
WooreviewsImporter_Plugin_ATextInput
can_compress_scripts
widget_recent-comments
WooreviewsImporter_Plugin_AmAwesome
WooreviewsImporter_Plugin__version
widget_recent-posts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

IRivYou - Add reviews from AliExpress and Amazon to woocommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5813.17 ▼1.001.88 ▼0.0542.18 ▼3.11
Dashboard /wp-admin2,221 ▲305.82 ▼0.0699.29 ▼3.8778.21 ▲34.41
Posts /wp-admin/edit.php2,107 ▲211.97 ▼0.0839.26 ▼1.0834.34 ▼2.28
Add New Post /wp-admin/post-new.php1,895 ▲36223.22 ▼0.03756.74 ▲81.9364.49 ▼8.23
Media Library /wp-admin/upload.php1,403 ▲154.13 ▼0.11103.87 ▼15.9780.92 ▲30.36

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
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_recent-comments
    • db_upgraded
    • WooreviewsImporter_Plugin__installed
    • WooreviewsImporter_Plugin_AmAwesome
    • can_compress_scripts
    • WooreviewsImporter_Plugin_CanDoSomething
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • WooreviewsImporter_Plugin_ATextInput
    • ...

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wooreviews-importer/wooreviews-importer.php:126
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wooreviews-importer/wooreviews-importer_init.php:140

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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 your attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6, #7, #0, #0 in wooreviews-importer/assets to your readme.txt
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

wooreviews-importer/wooreviews-importer.php Passed 13 tests

The principal PHP file in "IRivYou - Add reviews from AliExpress and Amazon to woocommerce" v. 2.2.1 is loaded by WordPress automatically on each request
59 characters long description:
Import Amazon reviews and Aliexpress reviews to woocommerce

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
Success! There were no dangerous files found in this plugin32,236 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS54,28011429,681
JavaScript491261,337
PHP95096441,218

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.67
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods4461.11%
▷ Protected methods2838.89%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/chrome-extension-logo.png1.98KB1.34KB▼ 32.55%
images/wooshark.png5.78KB5.78KB0.00%
images/wooshark_1_27x27.png1.23KB1.03KB▼ 16.53%