74% woocommerce-custom-order-data

Code Review | WooCommerce Custom Order Data

WordPress plugin WooCommerce Custom Order Data scored74%from 54 tests.

About plugin

  • Plugin page: woocommerce-custo...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.5.1
  • WordPress version: 6.3.1
  • First release: Jul 21, 2013
  • Latest release: Jul 23, 2013
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: mdjekic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /3,565 total downloads

Benchmarks

Plugin footprint 65% 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: ▼6.55ms] Passed 4 tests

Server-side resources used by WooCommerce Custom Order Data
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.23 ▼2.80
Dashboard /wp-admin3.32 ▼0.0244.66 ▼15.04
Posts /wp-admin/edit.php3.37 ▲0.0247.29 ▼0.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.26 ▼5.71
Media Library /wp-admin/upload.php3.24 ▲0.0233.44 ▼2.64

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Custom Order Data
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.04 ▼0.312.23 ▲0.4443.41 ▲4.20
Dashboard /wp-admin2,198 ▲185.59 ▼0.0684.83 ▼1.6739.91 ▼3.96
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0138.56 ▼3.5437.24 ▲0.73
Add New Post /wp-admin/post-new.php1,544 ▲1818.28 ▼5.51578.63 ▼112.6557.07 ▼4.12
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0095.11 ▼5.9842.99 ▼4.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_woocommerce_custom_order_data
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/woocommerce-custom-order-data/woocommerce-custom-order-data.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: data, order, custom, woocommerce, ecommerce

woocommerce-custom-order-data/woocommerce-custom-order-data.php Passed 13 tests

The primary PHP file in "WooCommerce Custom Order Data" version 1.0.1 is used by WordPress to initiate all plugin functionality
64 characters long description:
Plugin enables you to store and use custom data for your orders.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected76 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23110076

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions2
▷ Named functions2100.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