78% woo-refund-and-exchange-lite

Code Review | Return Refund and Exchange For WooCommerce - Return Management System, RMA Exchange, Wallet And Cancel Order Features

WordPress plugin Return Refund and Exchange For WooCommerce - Return Management System, RMA Exchange, Wallet And Cancel Order Features scored78%from 54 tests.

About plugin

  • Plugin page: woo-refund-and-ex...
  • Plugin version: 4.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 15, 2018
  • Latest release: Nov 27, 2023
  • Number of updates: 111
  • Update frequency: every 18.9 days
  • Top authors: makewebbetter (76.58%)wpswings (24.32%)

Code review

54 tests

User reviews

104 reviews

Install metrics

4,000+ active /121,508 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
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.64ms] Passed 4 tests

This is a short check of server-side resources used by Return Refund and Exchange For WooCommerce - Return Management System, RMA Exchange, Wallet And Cancel Order Features
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.70 ▼5.96
Dashboard /wp-admin3.31 ▼0.0445.56 ▼15.42
Posts /wp-admin/edit.php3.36 ▲0.0046.47 ▲2.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.04 ▼16.00
Media Library /wp-admin/upload.php3.23 ▲0.0035.94 ▲4.12

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 191 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Return Refund and Exchange For WooCommerce - Return Management System, RMA Exchange, Wallet And Cancel Order Features
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.37 ▲0.021.58 ▼0.3041.15 ▼0.92
Dashboard /wp-admin2,198 ▲215.61 ▼0.0594.04 ▼5.9141.63 ▼3.61
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0239.13 ▲2.2435.97 ▲0.55
Add New Post /wp-admin/post-new.php1,525 ▼1020.99 ▼4.14619.68 ▼17.7240.07 ▼20.20
Media Library /wp-admin/upload.php1,403 ▼04.17 ▼0.0399.79 ▲4.6444.47 ▼0.15

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 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-refund-and-exchange-lite/common/partials/woo-refund-and-exchange-lite-common-display.php
    • > /wp-content/plugins/woo-refund-and-exchange-lite/public/partials/woo-refund-and-exchange-lite-public-display.php
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/woo-refund-and-exchange-lite/admin/partials/pro_setting_templates/rma-return-refund-exchange-for-woocommerce-pro-returnship-label.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woo-refund-and-exchange-lite/public/index.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wps_rma_get_meta_data() in wp-content/plugins/woo-refund-and-exchange-lite/common/partials/email_template/woo-refund-and-exchange-lite-refund-request-email.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_order() in wp-content/plugins/woo-refund-and-exchange-lite/admin/partials/email_template/woo-refund-and-exchange-lite-refund-request-cancel-email.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woo-refund-and-exchange-lite/includes/index.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-refund-and-exchange-lite/onboarding/templates/woo-refund-and-exchange-lite-onboarding-template.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woo-refund-and-exchange-lite/wp-bakery-widgets/class-wps-rma-vc-widgets.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woo-refund-and-exchange-lite/index.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wps_rma_get_meta_data() in wp-content/plugins/woo-refund-and-exchange-lite/admin/partials/email_template/woo-refund-and-exchange-lite-refund-request-accept-email.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/woo-refund-and-exchange-lite/admin/partials/woo-refund-and-exchange-lite-overview.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Requires php: Invalid version format
You can look at the official readme.txt

woo-refund-and-exchange-lite/woocommerce-refund-and-exchange-lite.php 85% from 13 tests

"Return Refund and Exchange For WooCommerce - Return Management System, RMA Exchange, Wallet And Cancel Order Features" version 4.3.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 499 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-refund-and-exchange-lite.php" instead of "woocommerce-refund-and-exchange-lite.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
Success! There were no dangerous files found in this plugin51,337 lines of code in 138 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2110,21912,86534,751
PHP577072,2598,129
CSS207131854,519
Sass2733182,689
PO File1417648919
JSON300202
Markdown376083
XML10024
SVG51021

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity37.94
▷ Minimum class complexity1.00
▷ Maximum class complexity171.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods180
▷ Static methods137.22%
▷ Public methods16993.89%
▷ Protected methods21.11%
▷ Private methods95.00%
Functions29
▷ Named functions2793.10%
▷ Anonymous functions26.90%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
package/lib/datatables/media/images/sort_asc_disabled.png0.14KB0.25KB0.00%
admin/image/WPS_Grey.png0.88KB0.81KB▼ 7.92%
admin/image/Send-Email-Notification.png9.82KB4.23KB▼ 56.93%
admin/image/Set-Return-Refund-Conditions.png6.06KB3.00KB▼ 50.45%
package/lib/datatables/media/images/sort_asc.png0.16KB0.25KB0.00%