83% order-approval-by-customer-for-woocommerce

Code Review | Order Approval by Customer for WooCommerce

WordPress plugin Order Approval by Customer for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: order-approval-by...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Oct 12, 2019
  • Latest release: Feb 7, 2022
  • Number of updates: 31
  • Update frequency: every 27.4 days
  • Top authors: mswebarts (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /1,752 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Order Approval by Customer for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.41 ▼4.68
Dashboard /wp-admin3.31 ▲0.0142.68 ▼6.17
Posts /wp-admin/edit.php3.36 ▲0.0149.01 ▲0.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.34 ▼8.75
Media Library /wp-admin/upload.php3.23 ▲0.0133.23 ▼1.46

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Order Approval by Customer for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.18 ▼1.574.37 ▲2.6342.28 ▼5.14
Dashboard /wp-admin2,210 ▲225.79 ▲0.8997.41 ▼19.8939.59 ▼7.03
Posts /wp-admin/edit.php2,092 ▲212.00 ▲0.0239.39 ▲2.9335.61 ▼0.07
Add New Post /wp-admin/post-new.php1,537 ▲421.04 ▼2.02662.52 ▼26.4053.77 ▼6.32
Media Library /wp-admin/upload.php1,389 ▲14.31 ▼0.0099.51 ▼7.0942.88 ▼1.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/order-approval-by-customer-for-woocommerce/order-approval.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: order, approval, woocommerce, mark order

order-approval-by-customer-for-woocommerce/order-approval.php 77% from 13 tests

Analyzing the main PHP file in "Order Approval by Customer for WooCommerce" version 1.2.1
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("order-approval-by-customer-for-woocommerce.php" instead of "order-approval.php")
  • Description: The description should be shorter than 140 characters (currently 171 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin107 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13032101
CSS1006

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected