68% woo-customers-order-history

Code Review | Woocommerce Customers Order History

WordPress plugin Woocommerce Customers Order History scored 68% from 54 tests.

About plugin

  • Plugin page: woo-customers-ord...
  • Plugin version: 5.2.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 6, 2018
  • Latest release: Aug 2, 2023
  • Number of updates: 70
  • Update frequency: every 25.6 days
  • Top authors: javmah (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

1,000+ active / 19,248 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.52MB] [CPU: ▼3.67ms] Passed 4 tests

Server-side resources used by Woocommerce Customers Order History
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5842.41 ▼2.03
Dashboard /wp-admin3.89 ▲0.5852.20 ▲1.73
Posts /wp-admin/edit.php3.94 ▲0.5846.95 ▲0.13
Add New Post /wp-admin/post-new.php6.40 ▲0.5284.61 ▼14.50
Media Library /wp-admin/upload.php3.65 ▲0.4239.22 ▲2.54
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius3.9738.10

Server storage [IO: ▲3.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: 211 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
fs_accounts
wcchpo_install_date
can_compress_scripts
fs_debug_mode
theysaidso_admin_options
wcchpo_orderCacheStatus
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Customers Order History
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.69 ▼0.662.04 ▼0.1831.82 ▼19.89
Dashboard /wp-admin2,240 ▲525.82 ▼0.05114.96 ▼5.2046.07 ▲2.32
Posts /wp-admin/edit.php2,123 ▲342.04 ▲0.0635.31 ▼2.1037.52 ▲2.42
Add New Post /wp-admin/post-new.php1,546 ▲3221.01 ▲3.35686.04 ▼24.3260.15 ▲5.17
Media Library /wp-admin/upload.php1,422 ▲314.21 ▼0.0199.51 ▼3.5745.86 ▲0.30
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0631.7325.7524.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/woo-customers-order-history/includes/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • wcchpo_orderCacheStatus
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • fs_debug_mode
    • widget_recent-comments
    • wcchpo_install_date
    • fs_active_plugins
    • ...

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woo-customers-order-history/public/partials/woo-customers-order-history-public-display.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_redirect() in wp-content/plugins/woo-customers-order-history/admin/partials/wcchpo_product_history.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_redirect() in wp-content/plugins/woo-customers-order-history/admin/partials/wcchpo_download_history.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/woo-customers-order-history/admin/partials/wcchpo_settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_redirect() in wp-content/plugins/woo-customers-order-history/admin/partials/wcchpo_order_history.php:4

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: woocommerce history, woocommerce orders, woocommerce order history, order history, wordpress...

woo-customers-order-history/woo-customers-order-history.php Passed 13 tests

Analyzing the main PHP file in "Woocommerce Customers Order History" version 5.2.2
81 characters long description:
The most intuitive way to see a user's order history. Nothing will skip your eye.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin34,882 lines of code in 153 files:
LanguageFilesBlank linesComment linesLines of code
PHP1318,21817,92434,493
JavaScript538113200
PO File261115163
CSS151926

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity84.25
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods1,299
▷ Static methods19915.32%
▷ Public methods90569.67%
▷ Protected methods171.31%
▷ Private methods37729.02%
Functions102
▷ Named functions102100.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
8 PNG files occupy 0.34MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png69.82KB26.99KB▼ 61.34%
screenshot-2.png106.07KB33.46KB▼ 68.45%
Thumbnail.png2.71KB1.84KB▼ 32.24%
includes/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
banner-772x250.png21.22KB3.18KB▼ 84.99%