78% flexible-refund-and-return-order-for-woocommerce

Code Review | Flexible Refund and Return Order for WooCommerce

WordPress plugin Flexible Refund and Return Order for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: flexible-refund-a...
  • Plugin version: 1.0.13
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.4
  • WordPress version: 6.3.1
  • First release: Aug 4, 2022
  • Latest release: Nov 16, 2023
  • Number of updates: 29
  • Update frequency: every 16.3 days
  • Top authors: wpdesk (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active /7,180 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.16ms] Passed 4 tests

An overview of server-side resources used by Flexible Refund and Return Order for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1034.83 ▼3.37
Dashboard /wp-admin3.40 ▲0.0542.36 ▼16.93
Posts /wp-admin/edit.php3.45 ▲0.0944.23 ▼1.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0392.41 ▼14.51
Media Library /wp-admin/upload.php3.26 ▲0.0336.34 ▲4.01

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 562 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
plugin_activation_flexible-refund-and-return-order-for-woocommerce/flexible-refund-and-return-order-for-woocommerce.php

Browser metrics Passed 4 tests

An overview of browser requirements for Flexible Refund and Return Order for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.67 ▼0.041.83 ▲0.2137.61 ▼6.26
Dashboard /wp-admin2,192 ▲125.59 ▼0.0597.82 ▼5.2445.26 ▲0.80
Posts /wp-admin/edit.php2,103 ▲31.97 ▲0.0340.01 ▲1.6437.15 ▲2.19
Add New Post /wp-admin/post-new.php1,529 ▼723.08 ▼0.44655.08 ▼36.4152.51 ▲1.50
Media Library /wp-admin/upload.php1,394 ▼34.19 ▼0.0199.97 ▲0.5743.34 ▼1.76

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • plugin_activation_flexible-refund-and-return-order-for-woocommerce/flexible-refund-and-return-order-for-woocommerce.php

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

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 fix the following
  • 7× PHP files output text when accessed directly:
    • > /wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/flexible-refunds-core/src/Views/settings/form-start.php
    • > /wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/flexible-refunds-core/src/Views/settings/form-end.php
    • > /wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/wp-wpdesk-marketing/src/Boxes/Views/all.php
    • > /wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/wp-wpdesk-marketing/src/Boxes/Views/row_close.php
    • > /wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/flexible-refunds-core/src/Views/order/refund-meta-box.php
    • > /wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/wp-forms/templates/form-end.php
    • > /wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/wp-wpdesk-marketing/src/Boxes/Views/row_open.php
  • 338× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FRFreeVendor\\WPDesk\\Library\\FlexibleRefundsCore\\Emails\\AbstractRefundEmail' not found in wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/flexible-refunds-core/src/Emails/EmailRefundApproved.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'FRFreeVendor\\WPDesk\\View\\Resolver\\Resolver' not found in wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/wp-view/src/Resolver/DirResolver.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'FRFreeVendor\\WPDesk\\Library\\FlexibleRefundsCore\\Settings\\Tabs\\AbstractSettingsTab' not found in wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/flexible-refunds-core/src/Settings/Tabs/FormBuilderTab.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'FRFreeVendor\\Monolog\\Handler\\AbstractSyslogHandler' not found in wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor/psr/log/Psr/Log/NullLogger.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FRFreeVendor\\Monolog\\Formatter\\JsonFormatter' not found in wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'FRFreeVendor\\WPDesk\\Persistence\\PersistentContainer' not found in wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/wp-persistence/src/DeferredPersistentContainer.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'FRFreeVendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogglyHandler.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'FRFreeVendor\\Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'FRFreeVendor\\WPDesk\\PluginBuilder\\Plugin\\HookableCollection' not found in wp-content/plugins/flexible-refund-and-return-order-for-woocommerce/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/OptInOptOut.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce returns, woocommerce refund, woocommerce order management, woocommerce refunds, woocommerce cancel order

flexible-refund-and-return-order-for-woocommerce/flexible-refund-and-return-order-for-woocommerce.php 92% from 13 tests

The main PHP script in "Flexible Refund and Return Order for WooCommerce" version 1.0.13 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected28,082 lines of code in 545 files:
LanguageFilesBlank linesComment linesLines of code
PHP4931,30911,65022,898
JavaScript136189662,833
CSS16220641,209
JSON21001,117
Markdown25025

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.42
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces80
Interfaces56
Traits14
Classes349
▷ Abstract classes185.16%
▷ Concrete classes33194.84%
▷ Final classes195.74%
Methods1,822
▷ Static methods1216.64%
▷ Public methods1,40677.17%
▷ Protected methods20811.42%
▷ Private methods20811.42%
Functions55
▷ Named functions1425.45%
▷ Anonymous functions4174.55%
Constants195
▷ Global constants10.51%
▷ Class constants19499.49%
▷ Public constants16786.08%

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
7 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/logo.png2.36KB2.43KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/wpdesk.pl.png2.36KB2.43KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/octolize.com.png88.91KB39.07KB▼ 56.06%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/logo@2x.png4.17KB4.47KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/flexibleshipping.com.png5.63KB3.68KB▼ 34.58%