90% wc-past-orders

Code Review | Track Order History for WooCommerce

WordPress plugin Track Order History for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wc-past-orders
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 28, 2020
  • Latest release: Aug 22, 2023
  • Number of updates: 18
  • Update frequency: every 58.9 days
  • Top authors: AddWeb Solution Pvt. Ltd. (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /625 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.85ms] Passed 4 tests

Server-side resources used by Track Order History for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.24 ▲1.03
Dashboard /wp-admin3.31 ▲0.0045.10 ▼2.77
Posts /wp-admin/edit.php3.36 ▲0.0047.15 ▲1.70
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.49 ▼19.36
Media Library /wp-admin/upload.php3.23 ▲0.0033.17 ▲2.57

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Track Order History for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.22 ▼1.331.96 ▲0.2243.95 ▲0.20
Dashboard /wp-admin2,209 ▲215.91 ▲1.0099.39 ▼11.0642.01 ▼1.93
Posts /wp-admin/edit.php2,089 ▲32.06 ▲0.0436.88 ▲1.0034.55 ▼1.12
Add New Post /wp-admin/post-new.php1,514 ▼517.53 ▼5.78677.03 ▲3.7963.51 ▲3.56
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0896.52 ▼3.7242.03 ▼0.39

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • 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 no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 96% from 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
7 plugin tags: woocommerce order history, woocommerce, woocommerce history, order count, wordpress...

wc-past-orders/wptoh-track-order-history.php 92% from 13 tests

The main PHP script in "Track Order History for WooCommerce" version 1.3 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-past-orders.php" instead of "wptoh-track-order-history.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin340 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP667183178
CSS12014135
JavaScript12027

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.50
▷ Minimum class complexity9.00
▷ Maximum class complexity12.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1178.57%
▷ Protected methods00.00%
▷ Private methods321.43%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin