79% woohistory

Code Review | Customer Order History for WooCommerce

WordPress plugin Customer Order History for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: woohistory
  • Plugin version: 2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 20, 2019
  • Latest release: Dec 13, 2022
  • Number of updates: 16
  • Update frequency: every 88.9 days
  • Top authors: wpslash (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

70+ active /2,262 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.07MB] [CPU: ▲19.31ms] 75% from 4 tests

An overview of server-side resources used by Customer Order History for WooCommerce
It is recommended to improve the following
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.07MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.99 ▲5.5475.52 ▲34.75
Dashboard /wp-admin9.01 ▲5.7173.47 ▲23.99
Posts /wp-admin/edit.php9.02 ▲5.6670.71 ▲5.09
Add New Post /wp-admin/post-new.php9.25 ▲3.36112.34 ▲13.39
Media Library /wp-admin/upload.php9.01 ▲5.7967.12 ▲34.97
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius9.0155.07

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 191 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
can_compress_scripts
fs_debug_mode
widget_recent-posts
fs_accounts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
fs_active_plugins
fs_gdpr

Browser metrics Passed 4 tests

This is an overview of browser requirements for Customer Order History for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8313.18 ▼1.571.84 ▲0.1932.04 ▼14.94
Dashboard /wp-admin2,221 ▲335.83 ▼0.0599.29 ▼6.7143.34 ▼0.58
Posts /wp-admin/edit.php2,110 ▲162.02 ▲0.0034.50 ▼5.5536.32 ▼4.14
Add New Post /wp-admin/post-new.php1,544 ▲1118.21 ▼4.99618.91 ▼31.7357.55 ▲3.70
Media Library /wp-admin/upload.php1,406 ▲184.13 ▼0.1099.35 ▼19.9944.62 ▼3.99
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0781.7223.7326.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/woohistory/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • fs_active_plugins
    • widget_recent-comments
    • fs_gdpr
    • fs_accounts
    • fs_debug_mode
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: orders, history, order status, order history, woocommerce...

woohistory/woohistory.php Passed 13 tests

This is the main PHP file of "Customer Order History for WooCommerce" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
59 characters long description:
View Registered and Guest Customers Previous Order History.

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin33,974 lines of code in 142 files:
LanguageFilesBlank linesComment linesLines of code
PHP1178,00917,15033,256
CSS204145447
JavaScript33459194
PO File1181860
SVG15017

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity93.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes00.00%
Methods1,253
▷ Static methods19215.32%
▷ Public methods87169.51%
▷ Protected methods171.36%
▷ Private methods36529.13%
Functions104
▷ Named functions104100.00%
▷ Anonymous functions00.00%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%