10% order-table-for-woocommerce

Code Review | Wholesale Order Table for WooCommerce

WordPress plugin Wholesale Order Table for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: order-table-for-w...
  • Plugin version: 2.1.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2018
  • Latest release: Jan 10, 2023
  • Number of updates: 59
  • Update frequency: every 25.7 days
  • Top authors: arosoft (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /7,290 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Error in wp-content/plugins/order-table-for-woocommerce/includes/start-args.php+59
    Uncaught Error: Call to undefined function wc_get_attribute_taxonomy_names() in wp-content/plugins/order-table-for-woocommerce/includes/start-args.php:59
    Stack trace:
    #0 wp-content/plugins/order-table-for-woocommerce/otfw-order.php(259): include()
    #1 wp-includes/class-wp-hook.php(310): OTFW::activate()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(693): do_action()

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

Server-side resources used by Wholesale Order Table for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.25 ▼6.83
Dashboard /wp-admin3.31 ▲0.0142.98 ▼5.13
Posts /wp-admin/edit.php3.36 ▲0.0144.49 ▼1.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.10 ▼26.00
Media Library /wp-admin/upload.php3.23 ▲0.0033.20 ▼0.76

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 52 new files
Database: no new tables, 13 new options
New WordPress options
otfw_sale_badge
Activated_Plugin
widget_recent-comments
Order_Table_Activated_Plugin
theysaidso_admin_options
otfw_is_premium
otfw_override_all
otfw_confirm_input
can_compress_scripts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Wholesale Order Table for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.351.77 ▼0.2643.97 ▼1.12
Dashboard /wp-admin2,192 ▲155.62 ▼0.0389.12 ▼19.4538.80 ▼4.23
Posts /wp-admin/edit.php2,097 ▼61.98 ▼0.0436.06 ▼4.9031.57 ▼5.29
Add New Post /wp-admin/post-new.php1,526 ▼1222.91 ▲4.81585.90 ▼51.1457.60 ▼14.90
Media Library /wp-admin/upload.php1,391 ▼124.18 ▼0.0399.53 ▼5.9041.15 ▼1.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 13 options
    • otfw_sale_badge
    • otfw_use_plugin_increment_css
    • widget_recent-posts
    • widget_recent-comments
    • Order_Table_Activated_Plugin
    • otfw_is_premium
    • Activated_Plugin
    • theysaidso_admin_options
    • db_upgraded
    • otfw_override_all
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/order-table-for-woocommerce/templates/categories.php
    • > /wp-content/plugins/order-table-for-woocommerce/templates/product.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'OTFW' not found in wp-content/plugins/order-table-for-woocommerce/templates/woocommerce/content-product.php:2

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
10 plugin tags: form, b2b, takeaway, woocommerce, wholesale...

order-table-for-woocommerce/otfw-order.php 85% from 13 tests

The principal PHP file in "Wholesale Order Table for WooCommerce" v. 2.1.9 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("order-table-for-woocommerce.php" instead of "otfw-order.php")
  • 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 a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin15,075 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
CSS132971107,320
SVG3003,319
JavaScript71942292,226
PHP148831002,210

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity41.29
▷ Minimum class complexity6.00
▷ Maximum class complexity122.00
Average method complexity4.16
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods86
▷ Static methods1719.77%
▷ Public methods8396.51%
▷ Protected methods33.49%
▷ Private methods00.00%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin