84% ni-woocommerce-order-export

Code Review | Ni WooCommerce Order Export

WordPress plugin Ni WooCommerce Order Export scored84%from 54 tests.

About plugin

  • Plugin page: ni-woocommerce-or...
  • Plugin version: 3.1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: May 27, 2015
  • Latest release: May 11, 2023
  • Number of updates: 82
  • Update frequency: every 35.4 days
  • Top authors: anzia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /15,304 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.00ms] Passed 4 tests

Server-side resources used by Ni WooCommerce Order Export
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.91 ▲2.95
Dashboard /wp-admin3.41 ▲0.0650.22 ▼9.36
Posts /wp-admin/edit.php3.52 ▲0.1650.52 ▲0.87
Add New Post /wp-admin/post-new.php5.99 ▲0.1082.06 ▼15.98
Media Library /wp-admin/upload.php3.33 ▲0.1036.76 ▲0.46
Add-ons /wp-admin/admin.php?page=nioe-add-ons3.3230.93
Billing Address /wp-admin/admin.php?page=nioe-billing-address3.3932.36
Settings /wp-admin/admin.php?page=nioe-order-settings3.3030.93
Order Summary /wp-admin/admin.php?page=nioe-order-export3.4430.59
Shipping Address /wp-admin/admin.php?page=nioe-shipping-address3.3930.49
Order List /wp-admin/admin.php?page=nioe-order-list3.4129.34

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ni WooCommerce Order Export
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.35 ▼0.001.93 ▲0.3143.63 ▲2.33
Dashboard /wp-admin2,237 ▲605.68 ▲0.0894.91 ▲8.9141.58 ▲0.61
Posts /wp-admin/edit.php2,136 ▲361.95 ▼0.0835.77 ▲1.3433.73 ▼3.01
Add New Post /wp-admin/post-new.php1,557 ▲1423.34 ▲0.45681.22 ▲15.6951.29 ▼3.52
Media Library /wp-admin/upload.php1,433 ▲364.13 ▼0.0794.53 ▲2.7641.66 ▼0.09
Add-ons /wp-admin/admin.php?page=nioe-add-ons1,3172.0021.5133.88
Billing Address /wp-admin/admin.php?page=nioe-billing-address9121.7529.2028.32
Settings /wp-admin/admin.php?page=nioe-order-settings1,0192.0122.0327.92
Order Summary /wp-admin/admin.php?page=nioe-order-export8841.709.0945.92
Shipping Address /wp-admin/admin.php?page=nioe-shipping-address9121.7427.8026.02
Order List /wp-admin/admin.php?page=nioe-order-list9751.7329.6125.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=nioe-order-export
    • > Error in wp-content/plugins/ni-woocommerce-order-export/include/ni-order-summary.php+74
    Uncaught Error: Call to undefined function wc_price() in wp-content/plugins/ni-woocommerce-order-export/include/ni-order-summary.php:74
    Stack trace:
    #0 wp-content/plugins/ni-woocommerce-order-export/include/ni-order-summary.php(6): ni_order_summary->init()
    #1 wp-content/plugins/ni-woocommerce-order-export/include/ni-order-export.php(84): ni_order_summary->__construct()
    #2 wp-includes/class-wp-hook.php(310): ni_order_export->add_menu_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Dashboard Sales Analysis Report.), #2 (Sales order list.), #3 (Billing order list.), #4 (Shipping order list.), #5 (Order columns setting), #6 (Order Export to CSV)
You can take inspiration from this readme.txt

ni-woocommerce-order-export/ni-woocommerce-order-export.php Passed 13 tests

The main PHP script in "Ni WooCommerce Order Export" version 3.1.5 is automatically included on every request by WordPress
125 characters long description:
Ni WooCommerce Order Export plugin provides the functionality to export the sales order information into CSV or excel format.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin20,371 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript72,3931,60412,708
SVG2002,678
CSS351472,603
PHP93741652,382

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity33.75
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods75
▷ Static methods34.00%
▷ Public methods75100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
10 PNG files occupy 0.19MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png22.78KB14.98KB▼ 34.23%
screenshot-1.png88.62KB46.17KB▼ 47.91%
screenshot-6.png27.50KB12.80KB▼ 53.44%
screenshot-5.png10.12KB5.96KB▼ 41.10%
images/icon - Copy.png0.32KB0.41KB0.00%