83% sv-woocommerce-order-export

Code Review | SV WooCommerce Order Export

WordPress plugin SV WooCommerce Order Export scored83%from 54 tests.

About plugin

  • Plugin page: sv-woocommerce-or...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 14, 2018
  • Latest release: Mar 15, 2018
  • Number of updates: 26
  • Update frequency: every 0.0 days
  • Top authors: Matthias Reuter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,263 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.01ms] Passed 4 tests

Server-side resources used by SV WooCommerce Order Export
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.07 ▼6.57
Dashboard /wp-admin3.33 ▲0.0363.57 ▲11.43
Posts /wp-admin/edit.php3.39 ▲0.0352.60 ▼3.99
Add New Post /wp-admin/post-new.php5.94 ▲0.05102.19 ▼4.09
Media Library /wp-admin/upload.php3.26 ▲0.0344.75 ▲6.62
Order Export /wp-admin/admin.php?page=sv_woocommerce_order_export_user_settings3.2535.96
Global Settings /wp-admin/admin.php?page=sv_woocommerce_order_export_global_settings3.2840.70
Global Filters /wp-admin/admin.php?page=sv_woocommerce_order_export_global_filters3.2634.95

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 281 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
sv_woocommerce_order_export_version
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by SV WooCommerce Order Export
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,086 ▲32514.28 ▲0.041.67 ▼0.9051.48 ▼0.08
Dashboard /wp-admin2,477 ▲3005.64 ▼0.04108.20 ▼7.5881.47 ▲30.96
Posts /wp-admin/edit.php2,132 ▲322.07 ▲0.0541.57 ▼0.4437.61 ▼2.53
Add New Post /wp-admin/post-new.php1,553 ▲2722.93 ▼0.07774.39 ▲30.3642.79 ▼23.57
Media Library /wp-admin/upload.php1,428 ▲284.20 ▼0.00116.08 ▼6.6180.88 ▲22.61
Order Export /wp-admin/admin.php?page=sv_woocommerce_order_export_user_settings1,6462.1351.0837.20
Global Settings /wp-admin/admin.php?page=sv_woocommerce_order_export_global_settings2,4011.9030.8138.27
Global Filters /wp-admin/admin.php?page=sv_woocommerce_order_export_global_filters9741.9126.1633.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • sv_woocommerce_order_export_version
    • theysaidso_admin_options

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 129× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_OpenDocument_WriterPart' not found in wp-content/plugins/sv-woocommerce-order-export/lib/api/phpexcel/PHPExcel/Writer/OpenDocument/MetaInf.php:28
    • > PHP Warning
      require_once(SV_WOOCOMMERCE_ORDER_EXPORT_DIRlib/common/childs.inc.php): failed to open stream: No such file or directory in wp-content/plugins/sv-woocommerce-order-export/lib/modules/json.inc.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/sv-woocommerce-order-export/lib/api/phpexcel/PHPExcel/Writer/Excel2007/Theme.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/sv-woocommerce-order-export/lib/api/phpexcel/PHPExcel/Style/Color.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sv-woocommerce-order-export/lib/tpl/get_custom_export.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/sv-woocommerce-order-export/lib/api/phpexcel/PHPExcel/Writer/Excel2007/ContentTypes.php:28
    • > PHP Warning
      Use of undefined constant PHPEXCEL_ROOT - assumed 'PHPEXCEL_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/sv-woocommerce-order-export/lib/api/phpexcel/PHPExcel/Autoloader.php on line 70
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/sv-woocommerce-order-export/lib/api/phpexcel/PHPExcel/Style.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Worksheet_BaseDrawing' not found in wp-content/plugins/sv-woocommerce-order-export/lib/api/phpexcel/PHPExcel/Worksheet/MemoryDrawing.php:28
    • > PHP Notice
      Undefined variable: field_id in wp-content/plugins/sv-woocommerce-order-export/lib/tpl/subscriptions_user_settings_field.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

sv-woocommerce-order-export/sv_woocommerce_order_export.php 85% from 13 tests

"SV WooCommerce Order Export" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sv-woocommerce-order-export.php" instead of "sv_woocommerce_order_export.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin60,532 lines of code in 235 files:
LanguageFilesBlank linesComment linesLines of code
PHP23210,94636,18660,360
PO File175107123
CSS10037
JavaScript11012

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,177)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity49.84
▷ Minimum class complexity1.00
▷ Maximum class complexity1,177.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes213
▷ Abstract classes104.69%
▷ Concrete classes20395.31%
▷ Final classes00.00%
Methods3,090
▷ Static methods62820.32%
▷ Public methods2,42278.38%
▷ Protected methods792.56%
▷ Private methods58919.06%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants817
▷ Global constants12214.93%
▷ Class constants69585.07%
▷ Public constants695100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
lib/img/logo_icon.png1.34KB0.76KB▼ 43.44%