90% wc-customer-related-order

Code Review | WooCommerce Customer Related Order

WordPress plugin WooCommerce Customer Related Order scored90%from 54 tests.

About plugin

  • Plugin page: wc-customer-relat...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 3, 2018
  • Latest release: Jul 3, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: sabbir1991 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,389 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.04MB] [CPU: ▼4.88ms] Passed 4 tests

Server-side resources used by WooCommerce Customer Related Order
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.31 ▲4.40
Dashboard /wp-admin3.34 ▲0.0448.16 ▼2.34
Posts /wp-admin/edit.php3.40 ▲0.0444.18 ▼1.13
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.96 ▼15.26
Media Library /wp-admin/upload.php3.27 ▲0.0434.95 ▼0.78

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Customer Related Order
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.001.66 ▼0.0539.16 ▼0.78
Dashboard /wp-admin2,198 ▲235.60 ▼0.1283.81 ▼18.7036.25 ▼2.50
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0836.61 ▼0.9035.99 ▲4.44
Add New Post /wp-admin/post-new.php1,526 ▼222.96 ▼0.05602.06 ▼16.9364.79 ▲7.28
Media Library /wp-admin/upload.php1,403 ▼04.19 ▼0.0198.81 ▼0.4743.11 ▲0.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: customer-order, order, customer-related-order, woocommerce, related-order

wc-customer-related-order/wc-customer-related-order.php Passed 13 tests

The entry point to "WooCommerce Customer Related Order" version 1.0.0 is a PHP file that has certain tags in its header comment area
71 characters long description:
Helps to show related customer order in WooCommerce order details page.

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
No dangerous file extensions were detected247 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP138139168
JavaScript1161261
LESS11011
CSS1007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods758.33%
▷ Protected methods00.00%
▷ Private methods541.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin