56% reviewx

Code Review | ReviewX - Multi-criteria Rating & Reviews for WooCommerce

WordPress plugin ReviewX - Multi-criteria Rating & Reviews for WooCommerce scored56%from 54 tests.

About plugin

  • Plugin page: reviewx
  • Plugin version: 1.6.22
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 15, 2020
  • Latest release: Sep 11, 2023
  • Number of updates: 113
  • Update frequency: every 11.0 days
  • Top authors: A.R.Naim (82.3%)re_enter_rupok (18.58%)

Code review

54 tests

User reviews

49 reviews

Install metrics

10,000+ active /399,731 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲3.08MB] [CPU: ▲33.96ms] Passed 4 tests

An overview of server-side resources used by ReviewX - Multi-criteria Rating & Reviews for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.28 ▲2.8274.88 ▲36.95
Dashboard /wp-admin6.45 ▲3.1488.20 ▲36.66
Posts /wp-admin/edit.php6.54 ▲3.1893.13 ▲31.50
Add New Post /wp-admin/post-new.php9.27 ▲3.38122.80 ▲30.71
Media Library /wp-admin/upload.php6.42 ▲3.1977.62 ▲40.67
Google Review /wp-admin/admin.php?page=reviewx-google-review6.3566.57
WC Quick Setup /wp-admin/admin.php?page=reviewx-quick-setup7.0294.92
ReviewX /wp-admin/edit.php?post_type=reviewx6.4075.90
All ReviewX /wp-admin/admin.php?page=rx-admin6.4870.18
Review for Discount /wp-admin/admin.php?page=reviewx-discount6.4870.77
Add New /wp-admin/post-new.php?post_type=reviewx6.6692.28
All Reviews /wp-admin/admin.php?page=reviewx-all7.0976.87
Review Export /wp-admin/admin.php?page=rvx-export6.4472.47

Server storage [IO: ▲4.55MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 361 new files
Database: 4 new tables, 9 new options
New tables
wp_reviewx_process_jobs
wp_reviewx_criterias
wp_reviewx_reminder_email
wp_reviewx_import_history
New WordPress options
wpdeveloper_plugins_data
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
_rx_option_unsubscribe_url
widget_theysaidso_widget
_rx_wc_active_check
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for ReviewX - Multi-criteria Rating & Reviews for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲22113.83 ▼0.5510.40 ▲8.4246.80 ▲1.47
Dashboard /wp-admin2,278 ▲875.87 ▼0.04105.78 ▲0.3358.61 ▲18.28
Posts /wp-admin/edit.php2,172 ▲772.02 ▼0.0338.46 ▼3.1534.95 ▲1.25
Add New Post /wp-admin/post-new.php1,768 ▲23523.41 ▲0.20697.29 ▲84.2437.58 ▼12.51
Media Library /wp-admin/upload.php1,469 ▲814.15 ▼0.0499.21 ▼7.7978.03 ▲27.52
Google Review /wp-admin/admin.php?page=reviewx-google-review1,0482.3134.9635.57
WC Quick Setup /wp-admin/admin.php?page=reviewx-quick-setup4,0307.99199.25130.78
ReviewX /wp-admin/edit.php?post_type=reviewx1,1321.9335.2733.06
All ReviewX /wp-admin/admin.php?page=rx-admin1,2303.6449.0075.38
Review for Discount /wp-admin/admin.php?page=reviewx-discount2,2626.04139.4942.45
Add New /wp-admin/post-new.php?post_type=reviewx3,6455.4897.52125.67
All Reviews /wp-admin/admin.php?page=reviewx-all1,4743.9955.50103.39
Review Export /wp-admin/admin.php?page=rvx-export1,4703.7748.0479.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_reviewx_reminder_email
    • wp_reviewx_process_jobs
    • wp_reviewx_import_history
    • wp_reviewx_criterias
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • _rx_option_unsubscribe_url
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • _rx_wc_active_check

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=reviewx-discount
    • > Notice in wp-content/plugins/reviewx/partials/admin/reviewx-discount.php+240
    Undefined variable: wc_coupons
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=reviewx-discount
    • > Warning in wp-content/plugins/reviewx/partials/admin/reviewx-discount.php+401
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=reviewx-discount
    • > Notice in wp-content/plugins/reviewx/partials/admin/reviewx-discount.php+369
    Undefined variable: categories
    • > GET request to /wp-admin/admin.php?page=reviewx-discount
    • > Notice in wp-content/plugins/reviewx/partials/admin/reviewx-discount.php+401
    Undefined variable: wc_products

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/reviewx/resources/views/admin/pages/edit-review.php
    • > /wp-content/plugins/reviewx/includes/admin/fields/colorpicker.php
    • > /wp-content/plugins/reviewx/partials/storefront/shortcode/graph.php
    • > /wp-content/plugins/reviewx/resources/views/admin/components/manage-all-reviews/filter.php
    • > /wp-content/plugins/reviewx/partials/admin/rx-settings-sidebar.php
  • 183× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: key in wp-content/plugins/reviewx/includes/admin/fields/hidden.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/reviewx/resources/views/partials/utilities/reviewer.php:1
    • > PHP Warning
      Use of undefined constant REVIEWX_BASENAME - assumed 'REVIEWX_BASENAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/reviewx/includes/class-rx-message.php on line 901
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/reviewx/partials/admin/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/reviewx/config/settings.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/reviewx/partials/storefront/shortcode/graph.php on line 166
    • > PHP Fatal error
      Uncaught Error: Class 'ReviewX\\Controllers\\Controller' not found in wp-content/plugins/reviewx/app/Controllers/Admin/Core/ReviewxMetaBox.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/reviewx/resources/views/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reviewx/app/Customizer/output-css.php:72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/reviewx/resources/views/admin/components/manage-all-reviews/stats.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=reviewx-discount
    • > Network (severe)
    wp-content/plugins/reviewx/resources/assets/admin/images/info.png; - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=reviewx-google-review
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).sortable is not a function" "TypeError: $(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/reviewx/resources/assets/admin/js/reviewx-admin.js?ver=1.0.2:1311:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=reviewx-google-review
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).magnificPopup is not a function" "TypeError: $(...).magnificPopup is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/reviewx/resources/assets/admin/js/reviewx-admin.js?ver=1.0.2:1392:20)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=reviewx-discount
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).sortable is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=reviewx-discount
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).magnificPopup is not a function
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rvx-export
    • > Javascript (severe) in unknown
    /wp-content/plugins/reviewx/resources/assets/admin/js/reviewx-admin.js?ver=1.6.22 2083:69 Uncaught TypeError: $(...).select2 is not a function
    • > GET request to /wp-admin/admin.php?page=reviewx-discount
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).sortable is not a function" "TypeError: $(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/reviewx/resources/assets/admin/js/reviewx-admin.js?ver=1.6.22:1311:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=reviewx-discount
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).magnificPopup is not a function" "TypeError: $(...).magnificPopup is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/reviewx/resources/assets/admin/js/reviewx-admin.js?ver=1.6.22:1392:20)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #1, #10, #2, #3, #4, #5, #6, #7, #8, #9 in reviewx/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt is a good inspiration

reviewx/reviewx.php 92% from 13 tests

Analyzing the main PHP file in "ReviewX - Multi-criteria Rating & Reviews for WooCommerce" version 1.6.22
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 165 characters long)

Code Analysis 97% from 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
No dangerous file extensions were detected81,552 lines of code in 292 files:
LanguageFilesBlank linesComment linesLines of code
PHP2428,0278,07966,304
CSS111,28530510,033
JavaScript157032924,480
SVG19013473
Sass1370160
JSON410102

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 250)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity26.64
▷ Minimum class complexity1.00
▷ Maximum class complexity473.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity250.00
Code structure
Namespaces33
Interfaces4
Traits9
Classes106
▷ Abstract classes54.72%
▷ Concrete classes10195.28%
▷ Final classes00.00%
Methods1,051
▷ Static methods17616.75%
▷ Public methods86282.02%
▷ Protected methods11510.94%
▷ Private methods747.04%
Functions138
▷ Named functions9367.39%
▷ Anonymous functions4532.61%
Constants44
▷ Global constants2454.55%
▷ Class constants2045.45%
▷ Public constants20100.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
34 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/assets/admin/images/themes/email-template-upcoming.png1.61KB0.79KB▼ 51.21%
resources/assets/admin/images/themes/photo-style-2.png3.04KB1.99KB▼ 34.48%
resources/views/assets/images/video-icon.png16.57KB1.54KB▼ 90.71%
resources/assets/admin/images/icons/views-icon.png2.02KB1.03KB▼ 49.10%
resources/assets/admin/images/themes/graph_style-2.png2.13KB1.44KB▼ 32.54%