83% wc-order-export

Code Review | WC Order Export

WordPress plugin WC Order Export scored 83% from 54 tests.

About plugin

  • Plugin page: wc-order-export
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0
  • WordPress version: 6.3.1
  • First release: Jun 23, 2017
  • Latest release: Dec 13, 2018
  • Number of updates: 17
  • Update frequency: every 31.7 days
  • Top authors: sarkparanjothi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 2,183 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.08ms] Passed 4 tests

This is a short check of server-side resources used by WC Order Export
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.37 ▲3.35
Dashboard /wp-admin3.35 ▲0.0447.71 ▲0.08
Posts /wp-admin/edit.php3.40 ▲0.0448.05 ▼7.01
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.51 ▼21.92
Media Library /wp-admin/upload.php3.27 ▲0.0437.90 ▲0.53

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 265 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WC Order Export
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.28 ▼1.031.62 ▼0.1942.94 ▲0.70
Dashboard /wp-admin2,212 ▲245.83 ▲0.76102.88 ▼12.0741.39 ▲0.46
Posts /wp-admin/edit.php2,095 ▲32.02 ▲0.0438.51 ▼1.9435.21 ▼0.90
Add New Post /wp-admin/post-new.php1,541 ▲2223.20 ▼0.30656.40 ▼19.5855.45 ▲4.22
Media Library /wp-admin/upload.php1,391 ▲34.32 ▲0.1498.05 ▼2.0442.07 ▼1.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 101× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/wc-order-export/classes/PHPExcel/Writer/Excel2007/Comments.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_OpenDocument_WriterPart' not found in wp-content/plugins/wc-order-export/classes/PHPExcel/Writer/OpenDocument/Mimetype.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/wc-order-export/classes/PHPExcel/CachedObjectStorage/SQLite.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/wc-order-export/classes/PHPExcel/Style/Fill.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/wc-order-export/classes/PHPExcel/Writer/Excel2007/Worksheet.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Abstract' not found in wp-content/plugins/wc-order-export/classes/PHPExcel/Writer/Excel5.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/wc-order-export/classes/PHPExcel/CachedObjectStorage/APC.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/wc-order-export/classes/PHPExcel/Style/Font.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPExcel_Writer_IWriter' not found in wp-content/plugins/wc-order-export/classes/PHPExcel/Writer/Abstract.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/wc-order-export/classes/PHPExcel/Shared/trend/exponentialBestFitClass.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes: You can look at the official readme.txt

wc-order-export/wcexord_export.php 92% from 13 tests

The principal PHP file in "WC Order Export" v. 1.5.0 is loaded by WordPress automatically on each request
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-export.php" instead of "wcexord_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
No dangerous file extensions were detected59,533 lines of code in 223 files:
LanguageFilesBlank linesComment linesLines of code
PHP21910,86035,80958,541
CSS25234776
JavaScript23920216

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,019)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity49.35
▷ Minimum class complexity1.00
▷ Maximum class complexity1,019.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes209
▷ Abstract classes104.78%
▷ Concrete classes19995.22%
▷ Final classes00.00%
Methods2,885
▷ Static methods62821.77%
▷ Public methods2,29179.41%
▷ Protected methods802.77%
▷ Private methods51417.82%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants812
▷ Global constants11814.53%
▷ Class constants69485.47%
▷ Public constants694100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_555555_256x240.png3.20KB3.50KB0.00%
assets/css/images/ui-icons_444444_256x240.png3.19KB3.49KB0.00%