79% ry-woocommerce-tools

Code Review | RY WooCommerce Tools

WordPress plugin RY WooCommerce Tools scored79%from 54 tests.

About plugin

  • Plugin page: ry-woocommerce-tools
  • Plugin version: 3.0.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.4
  • WordPress version: 6.3.1
  • First release: Mar 13, 2018
  • Latest release: Nov 29, 2023
  • Number of updates: 530
  • Update frequency: every 4.0 days
  • Top authors: fantasyworld (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

5,000+ active /123,762 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
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.35ms] Passed 4 tests

An overview of server-side resources used by RY WooCommerce Tools
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.05 ▼6.22
Dashboard /wp-admin3.39 ▲0.0945.38 ▼1.71
Posts /wp-admin/edit.php3.51 ▲0.1547.29 ▲1.26
Add New Post /wp-admin/post-new.php5.97 ▲0.0988.48 ▼6.74
Media Library /wp-admin/upload.php3.32 ▲0.0935.30 ▲4.10

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 135 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
RY_WT_smilepay_shipping_auto_order_status
widget_theysaidso_widget
can_compress_scripts
RY_WT_ecpay_shipping_auto_order_status
RY_WT_ecpay_shipping_pickup_time
RY_WT_ecpay_shipping_box_size
RY_WT_version
theysaidso_admin_options
widget_recent-posts
...

Browser metrics Passed 4 tests

RY WooCommerce Tools: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5814.31 ▲0.021.81 ▲0.0737.81 ▼6.44
Dashboard /wp-admin2,197 ▲195.59 ▼0.0496.23 ▼19.8543.62 ▼0.22
Posts /wp-admin/edit.php2,108 ▲81.95 ▼0.0739.09 ▼5.2538.41 ▲3.54
Add New Post /wp-admin/post-new.php1,531 ▲323.35 ▲0.10669.71 ▲45.4044.86 ▼1.46
Media Library /wp-admin/upload.php1,405 ▲114.19 ▲0.0196.22 ▲0.6643.54 ▲1.95

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 11 options
    • RY_WT_smilepay_shipping_auto_order_status
    • RY_WT_ecpay_shipping_box_size
    • RY_WT_version
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • RY_WT_ecpay_shipping_auto_order_status
    • can_compress_scripts
    • RY_WT_ecpay_shipping_pickup_time
    • widget_theysaidso_widget
    • ...

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ry-woocommerce-tools/woocommerce/admin/settings/html/pro-info.php
    • > /wp-content/plugins/ry-woocommerce-tools/ry-woocommerce-tools.php
  • 142× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      include(RY_WT_PLUGIN_DIRwoocommerce/gateways/global-setting.php): failed to open stream: No such file or directory in wp-content/plugins/ry-woocommerce-tools/woocommerce/gateways/smilepay/includes/settings/cvs.php on line 3
    • > PHP Warning
      include(RY_WT_PLUGIN_DIRwoocommerce/gateways/global-setting.php): failed to open stream: No such file or directory in wp-content/plugins/ry-woocommerce-tools/woocommerce/gateways/smilepay/includes/settings/barcode.php on line 3
    • > PHP Warning
      include(RY_WT_PLUGIN_DIRwoocommerce/gateways/global-setting.php): failed to open stream: No such file or directory in wp-content/plugins/ry-woocommerce-tools/woocommerce/gateways/smilepay/includes/settings/webatm.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'RY_WT_WC_NewebPay_Payment_Gateway' not found in wp-content/plugins/ry-woocommerce-tools/woocommerce/gateways/newebpay/gateway-atm.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'RY_WT_WC_ECPay_Shipping_Method' not found in wp-content/plugins/ry-woocommerce-tools/woocommerce/shipping/ecpay/shipping-home-post.php:3
    • > PHP Warning
      include(): Failed opening 'RY_WT_PLUGIN_DIRwoocommerce/gateways/global-setting.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/ry-woocommerce-tools/woocommerce/gateways/newebpay/includes/settings/barcode.php on line 3
    • > PHP Warning
      include(RY_WT_PLUGIN_DIRwoocommerce/gateways/global-setting.php): failed to open stream: No such file or directory in wp-content/plugins/ry-woocommerce-tools/woocommerce/gateways/newebpay/includes/settings/atm.php on line 3
    • > PHP Warning
      Use of undefined constant RY_WT_PLUGIN_DIR - assumed 'RY_WT_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/ry-woocommerce-tools/woocommerce/gateways/smilepay/includes/settings/webatm.php on line 3
    • > PHP Warning
      include(): Failed opening 'RY_WT_PLUGIN_DIRwoocommerce/shipping/global-setting.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/ry-woocommerce-tools/woocommerce/shipping/ecpay/includes/settings/cvs.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'RY_WT_WC_Model' not found in wp-content/plugins/ry-woocommerce-tools/woocommerce/gateways/smilepay/gateway.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: gateway, shipping, newebpay, smilepay, payment...

ry-woocommerce-tools/ry-woocommerce-tools.php Passed 13 tests

"RY WooCommerce Tools" version 3.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
37 characters long description:
WooCommerce paymet and shipping tools

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin8,415 lines of code in 121 files:
LanguageFilesBlank linesComment linesLines of code
PHP1171,2002388,245
JavaScript270142
CSS24028

PHP code Passed 2 tests

Analyzing 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.31
Average class complexity11.81
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes79
▷ Abstract classes1417.72%
▷ Concrete classes6582.28%
▷ Final classes2233.85%
Methods371
▷ Static methods4712.67%
▷ Public methods28576.82%
▷ Protected methods8522.91%
▷ Private methods10.27%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants48
▷ Global constants510.42%
▷ Class constants4389.58%
▷ Public constants43100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to 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
icon/ecpay_logo.png1.98KB2.21KB0.00%
icon/smilepay_logo.png4.81KB3.53KB▼ 26.73%
icon/newebpay_logo.png3.78KB2.76KB▼ 27.17%