78% cancel-order-request-woocommerce

Code Review | Cancel order request / Return order / Repeat Order / Reorder for WooCommerce

WordPress plugin Cancel order request / Return order / Repeat Order / Reorder for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: cancel-order-requ...
  • Plugin version: 1.3.3.24
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.0
  • WordPress version: 6.3.1
  • First release: Jul 25, 2020
  • Latest release: Dec 2, 2023
  • Number of updates: 131
  • Update frequency: every 9.4 days
  • Top authors: rajeshsingh520 (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

2,000+ active /70,681 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by Cancel order request / Return order / Repeat Order / Reorder for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.31 ▼6.63
Dashboard /wp-admin3.32 ▲0.0151.78 ▲3.68
Posts /wp-admin/edit.php3.37 ▲0.0148.34 ▼0.84
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.04 ▲1.60
Media Library /wp-admin/upload.php3.24 ▲0.0151.12 ▲19.52

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Cancel order request / Return order / Repeat Order / Reorder for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4914.23 ▼0.051.51 ▼0.1736.42 ▼6.96
Dashboard /wp-admin2,204 ▲335.58 ▲0.0195.11 ▼3.2442.90 ▼5.84
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0038.63 ▼5.4937.51 ▼2.14
Add New Post /wp-admin/post-new.php1,532 ▲623.54 ▲0.42649.52 ▼19.6863.19 ▼8.65
Media Library /wp-admin/upload.php1,409 ▲94.21 ▲0.0299.97 ▼8.6542.75 ▼4.52

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/cancel-order-request-woocommerce/includes/pisol.class.form.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/cancel-order-request-woocommerce/public/order-detail-link-email.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/cancel-order-request-woocommerce/public/partials/cancel-order-request-form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cancel-order-request-woocommerce/includes/class-emails.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cancel-order-request-woocommerce/admin/basic.php:111
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cancel-order-request-woocommerce/admin/plugins.php:93
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cancel-order-request-woocommerce/public/detect-order-status-change.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/cancel-order-request-woocommerce/public/reorder.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cancel-order-request-woocommerce/includes/includes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cancel-order-request-woocommerce/admin/reorder.php:112
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cancel-order-request-woocommerce/admin/order-status.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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:
  • Donate link: Invalid URI found ("piwebsolution.com")
  • Screenshots: These screenshots lack descriptions #1, #10, #11, #12, #13, #14, #15, #16, #17, #2, #3, #4, #6, #7, #9 in cancel-order-request-woocommerce/assets to your readme.txt
Please take inspiration from this readme.txt

cancel-order-request-woocommerce/cancel-order-request-woocommerce.php Passed 13 tests

This is the main PHP file of "Cancel order request / Return order / Repeat Order / Reorder for WooCommerce" version 1.3.3.24, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
115 characters long description:
Gives option to replace Cancel order button with Cancel order request button, so user can send cancellation request

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
There were no executable files found in this plugin15,638 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
CSS52,128189,999
SVG6553,342
PHP406736472,120
JavaScript5319166
XML10011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity10.31
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods141
▷ Static methods2920.57%
▷ Public methods13595.74%
▷ Protected methods10.71%
▷ Private methods53.55%
Functions12
▷ Named functions758.33%
▷ Anonymous functions541.67%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.50MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/pi-web-solution.png21.25KB9.42KB▼ 55.67%
admin/img/product-variation.png228.45KB78.31KB▼ 65.72%
admin/img/product-page.png206.06KB60.22KB▼ 70.78%
admin/img/close.png4.32KB3.39KB▼ 21.57%
admin/img/category.png49.73KB18.10KB▼ 63.60%