68% woocommerce-csv-export-for-user-roles

Code Review | Woocommerce Order Report Snapshot

WordPress plugin Woocommerce Order Report Snapshot scored68%from 54 tests.

About plugin

  • Plugin page: woocommerce-csv-e...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Apr 27, 2015
  • Latest release: Apr 27, 2015
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: clickersonline (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,333 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.21MB] [CPU: ▼44.39ms] Passed 4 tests

Server-side resources used by Woocommerce Order Report Snapshot
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.76 ▼0.7012.64 ▼25.91
Dashboard /wp-admin2.80 ▼0.5015.65 ▼30.91
Posts /wp-admin/edit.php2.80 ▼0.5615.91 ▼36.68
Add New Post /wp-admin/post-new.php2.80 ▼3.0915.16 ▼84.05
Media Library /wp-admin/upload.php2.80 ▼0.4315.01 ▼20.79
Order Export /wp-admin/admin.php?page=order-export2.8016.09

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce Order Report Snapshot
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.371.77 ▲0.1542.83 ▲5.16
Dashboard /wp-admin2,195 ▲185.67 ▲0.0286.07 ▼1.1236.32 ▼4.57
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0335.39 ▼0.3833.37 ▲1.73
Add New Post /wp-admin/post-new.php1,526 ▼222.96 ▲0.18602.21 ▼22.5056.92 ▼19.22
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.0496.21 ▼9.0139.52 ▼6.40
Order Export /wp-admin/admin.php?page=order-export8271.8526.6124.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/woocommerce-csv-export-for-user-roles/wooexportcsv.php+36
    Undefined index: woo_export_csv
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=order-export
    • > Notice in wp-content/plugins/woocommerce-csv-export-for-user-roles/wooexportcsv.php+36
    Undefined index: woo_export_csv

SRP 50% 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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/woocommerce-csv-export-for-user-roles/export.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/woocommerce-csv-export-for-user-roles/wooexportcsv.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === woocommerce-csv-export-for-user-roles === )
The official readme.txt might help

woocommerce-csv-export-for-user-roles/wooexportcsv.php 85% from 13 tests

The main PHP file in "Woocommerce Order Report Snapshot" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
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 ("woocommerce-csv-export-for-user-roles.php" instead of "wooexportcsv.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 191 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin244 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP33021238
CSS2154
JavaScript10102

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions8
▷ Named functions8100.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
13 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-icons_2e83ff_256x240.png4.49KB4.18KB▼ 6.89%
images/ui-bg_glass_95_fef1ec_1x400.png0.36KB0.15KB▼ 59.57%
images/ui-icons_888888_256x240.png6.93KB4.18KB▼ 39.62%
images/ui-icons_222222_256x240.png6.84KB4.18KB▼ 38.88%
images/ui-icons_454545_256x240.png6.91KB4.18KB▼ 39.44%