58% customer-list-export-for-woocommerce

Code Review | Customer List Export for Woocommerce

WordPress plugin Customer List Export for Woocommerce scored 58% from 54 tests.

About plugin

  • Plugin page: customer-list-exp...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 2, 2022
  • Latest release: Dec 4, 2022
  • Number of updates: 8
  • Update frequency: every 0.3 days
  • Top authors: nickstewart95 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 167 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
This plugin's installer ran successfully

Server metrics [RAM: ▼1.05MB] [CPU: ▼41.93ms] Passed 4 tests

This is a short check of server-side resources used by Customer List Export for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.93 ▼0.5313.06 ▼27.01
Dashboard /wp-admin2.96 ▼0.3415.39 ▼31.78
Posts /wp-admin/edit.php2.96 ▼0.3916.01 ▼27.94
Add New Post /wp-admin/post-new.php2.96 ▼2.9216.24 ▼80.97
Media Library /wp-admin/upload.php2.96 ▼0.2614.11 ▼22.61

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 1,686 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Customer List Export for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.091.68 ▼0.0344.77 ▲3.22
Dashboard /wp-admin2,203 ▲125.84 ▼0.0996.40 ▼4.1438.88 ▼5.36
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0333.13 ▼0.5036.99 ▲4.96
Add New Post /wp-admin/post-new.php1,547 ▲518.46 ▲0.12658.78 ▲68.4168.19 ▲11.63
Media Library /wp-admin/upload.php1,382 ▼64.18 ▼0.0294.99 ▼14.7242.20 ▼5.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/customer-list-export-for-woocommerce/src/Loader.php+69
    Undefined index: source
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 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 0% from 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/customer-list-export-for-woocommerce/src/resources/pages/admin/main.blade.php
  • 263× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/customer-list-export-for-woocommerce/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php:17
    • > PHP Fatal error
      Trait 'Carbon\\Traits\\Boundaries' not found in wp-content/plugins/customer-list-export-for-woocommerce/vendor/nesbot/carbon/src/Carbon/Traits/Date.php on line 527
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\BadMethodCallException' not found in wp-content/plugins/customer-list-export-for-woocommerce/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php:17
    • > PHP Fatal error
      Trait 'Carbon\\Traits\\ObjectInitialisation' not found in wp-content/plugins/customer-list-export-for-woocommerce/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 36
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon\\PHPStan\\AbstractReflectionMacro' not found in wp-content/plugins/customer-list-export-for-woocommerce/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/customer-list-export-for-woocommerce/vendor/illuminate/support/Facades/Http.php:56
    • > PHP Fatal error
      Trait 'Illuminate\\Support\\Traits\\Macroable' not found in wp-content/plugins/customer-list-export-for-woocommerce/vendor/illuminate/support/Optional.php on line 9
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\View\\ViewFinderInterface' not found in wp-content/plugins/customer-list-export-for-woocommerce/vendor/illuminate/view/FileViewFinder.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\SimpleCache\\CacheInterface' not found in wp-content/plugins/customer-list-export-for-woocommerce/vendor/illuminate/contracts/Cache/Repository.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon\\AbstractTranslator' not found in wp-content/plugins/customer-list-export-for-woocommerce/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php:17

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

customer-list-export-for-woocommerce/customer-list-export-for-woocommerce.php Passed 13 tests

The main file in "Customer List Export for Woocommerce" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
54 characters long description:
Export a customer list with addresses from WooCommerce

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Almost there! Just fix the following issues
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/customer-list-export-for-woocommerce/vendor/nesbot/carbon/bin/carbon.bat
66,626 lines of code in 1,454 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,39712,68944,35659,526
XSD392482,803
JSON27002,677
Markdown2046011,120
JavaScript217357
reStructuredText1747874
Blade10046
CSS11017
DOS Batch1004
YAML1002

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.99
▷ Minimum class complexity1.00
▷ Maximum class complexity318.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces94
Interfaces148
Traits61
Classes344
▷ Abstract classes226.40%
▷ Concrete classes32293.60%
▷ Final classes3912.11%
Methods4,196
▷ Static methods68016.21%
▷ Public methods3,51383.72%
▷ Protected methods53412.73%
▷ Private methods1493.55%
Functions658
▷ Named functions13921.12%
▷ Anonymous functions51978.88%
Constants204
▷ Global constants83.92%
▷ Class constants19696.08%
▷ Public constants19197.45%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.31MB with 0.26MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png318.19KB49.41KB▼ 84.47%