84% wc-order-details

Code Review | Extended Order Details for WooCommerce

WordPress plugin Extended Order Details for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-order-details
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Aug 6, 2019
  • Latest release: May 1, 2023
  • Number of updates: 28
  • Update frequency: every 48.8 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /2,154 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Extended Order Details for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.21 ▼5.50
Dashboard /wp-admin3.32 ▲0.0249.15 ▼5.49
Posts /wp-admin/edit.php3.37 ▲0.0154.02 ▲4.79
Add New Post /wp-admin/post-new.php5.90 ▲0.01102.41 ▲12.27
Media Library /wp-admin/upload.php3.24 ▲0.0137.70 ▲1.20

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Extended Order Details for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.75 ▲0.451.83 ▼0.4644.48 ▼0.66
Dashboard /wp-admin2,192 ▲125.59 ▼0.0684.29 ▼13.9839.52 ▼5.47
Posts /wp-admin/edit.php2,103 ▼02.00 ▼0.0240.83 ▲5.8035.63 ▲0.10
Add New Post /wp-admin/post-new.php1,545 ▲1323.44 ▲0.20630.84 ▼24.7655.46 ▼0.57
Media Library /wp-admin/upload.php1,394 ▼64.27 ▲0.0597.35 ▼2.8244.38 ▲0.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/wc-order-details/assets/wcod-template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-order-details/inc/wcod_settings.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: export orders, order items, order export, extended order details

wc-order-details/index.php 92% from 13 tests

Analyzing the main PHP file in "Extended Order Details for WooCommerce" version 2.0.0
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 ("wc-order-details.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected11,273 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,546
PHP4307681,149
PO File492100260
CSS42511208
JavaScript43213110

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/350x400.png1.30KB1.25KB▼ 3.92%