62% woo-customers-spreadsheet-bulk-edit

Code Review | WooCommerce Customers Table: View, Search, Bulk Editor

WordPress plugin WooCommerce Customers Table: View, Search, Bulk Editor scored 62% from 54 tests.

About plugin

  • Plugin page: woo-customers-spr...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: Aug 13, 2018
  • Latest release: Mar 18, 2022
  • Number of updates: 21
  • Update frequency: every 62.5 days
  • Top authors: JoseVega (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 4,298 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲5.46MB] [CPU: ▲44.92ms] 75% from 4 tests

Server-side resources used by WooCommerce Customers Table: View, Search, Bulk Editor
Please fix the following
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.46MB on /wp-admin/admin.php?page=vg_sheet_editor_setup)
PageMemory (MB)CPU Time (ms)
Home /8.68 ▲5.2287.57 ▲46.23
Dashboard /wp-admin8.89 ▲5.58129.51 ▲76.56
Posts /wp-admin/edit.php8.94 ▲5.5894.54 ▲42.13
Add New Post /wp-admin/post-new.php11.40 ▲5.52152.78 ▲29.58
Media Library /wp-admin/upload.php8.74 ▲5.5296.48 ▲61.73
Bulk Edit Users /wp-admin/admin.php?page=wpseu_welcome_page9.0085.55
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.9885.06
Settings /wp-admin/admin.php?page=vg_sheet_editor8.8488.28
Edit Users /wp-admin/admin.php?page=vgse-bulk-edit-user9.0598.64
Extensions /wp-admin/admin.php?page=vg_sheet_editor_extensions8.7883.15
Bulk Edit Users /wp-admin/admin.php?page=wpseu_whats_new8.7375.37
Sheet Editor /wp-admin/admin.php?page=vg_sheet_editor_whats_new8.77110.81
WP Sheet Editor /wp-admin/admin.php?page=vg_sheet_editor_setup8.8094.15

Server storage [IO: ▲15.26MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 363 new files
Database: no new tables, 16 new options
New WordPress options
widget_recent-posts
vg_sheet_editor
vgse_disable_quick_setup
theysaidso_admin_options
fs_gdpr
vgse_user_path
can_compress_scripts
vgse_columns_visibility_migrated
vgse_columns_visibility
wpseu_welcome_redirect
...

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Customers Table: View, Search, Bulk Editor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲20013.32 ▲0.082.27 ▲0.1630.50 ▼10.73
Dashboard /wp-admin2,355 ▲1494.87 ▼0.0099.35 ▼9.4484.78 ▲44.75
Posts /wp-admin/edit.php2,166 ▲772.01 ▲0.0239.74 ▲4.3737.70 ▲4.94
Add New Post /wp-admin/post-new.php1,414 ▼12417.71 ▼5.44889.67 ▲235.3852.87 ▼14.59
Media Library /wp-admin/upload.php1,459 ▲684.21 ▼0.1097.30 ▲3.6879.22 ▲35.53
Bulk Edit Users /wp-admin/admin.php?page=wpseu_welcome_page1,0392.0427.3256.79
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,1091.6828.2925.20
Settings /wp-admin/admin.php?page=vg_sheet_editor1,9285.79166.6271.75
Edit Users /wp-admin/admin.php?page=vgse-bulk-edit-user4,7409.06323.1993.13
Extensions /wp-admin/admin.php?page=vg_sheet_editor_extensions1,8955.5968.5783.93
Bulk Edit Users /wp-admin/admin.php?page=wpseu_whats_new8952.1325.1629.13
Sheet Editor /wp-admin/admin.php?page=vg_sheet_editor_whats_new1,9035.4670.2968.22
WP Sheet Editor /wp-admin/admin.php?page=vg_sheet_editor_setup2,0345.4577.6182.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/vendor/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 13 options in the database
    • wpseu_welcome_redirect
    • can_compress_scripts
    • fs_active_plugins
    • fs_gdpr
    • widget_recent-posts
    • widget_theysaidso_widget
    • vg_sheet_editor
    • vgse_columns_visibility
    • fs_accounts
    • fs_debug_mode
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=wpseu_whats_new
    • > Warning in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/vg-plugin-sdk/index.php+180
    include(wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/views/whats-new/1.3.4.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=wpseu_whats_new
    • > Warning in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/vg-plugin-sdk/index.php+180
    include(): Failed opening 'wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/views/whats-new/1.3.4.php' for inclusion (include_path='.:/usr/share/php')
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vg_sheet_editor_whats_new
    • > Notice in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/whats-new.php+25
    Undefined variable: items
    • > GET request to /wp-admin/admin.php?page=vg_sheet_editor_whats_new
    • > Warning in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/whats-new.php+24
    include(wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/whats-new/2.24.12.1.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=vg_sheet_editor_whats_new
    • > Warning in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/whats-new.php+24
    include(): Failed opening 'wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/whats-new/2.24.12.1.php' for inclusion (include_path='.:/usr/share/php')

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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/single-extension.php
  • 71× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: extension in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/single-extension.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Sheet_Editor_Bootstrap' not found in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/inc/spreadsheet-bootstrap.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/extensions-page.php:5
    • > PHP Notice
      Undefined variable: extension in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/single-extension.php on line 18
    • > PHP Notice
      Undefined variable: random_id in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/columns-visibility/views/form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/editor-metabox-modal.php:77
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/inc/teasers/coupons.php:94
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/single-extension.php on line 10
    • > PHP Notice
      Trying to get property 'key' of non-object in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/editor-metabox-modal.php on line 72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPSE_Options_Page_Obj() in wp-content/plugins/woo-customers-spreadsheet-bulk-edit/vendor/wp-sheet-editor-users/modules/wp-sheet-editor/views/advanced-settings-modal.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: bulk edit, spreadsheet, woocommerce, wp sheet editor, customers

woo-customers-spreadsheet-bulk-edit/woocommerce-customers.php 92% from 13 tests

The main PHP script in "WooCommerce Customers Table: View, Search, Bulk Editor" version 1.0.8 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-customers-spreadsheet-bulk-edit.php" instead of "woocommerce-customers.php")

Code Analysis 97% from 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
No dangerous file extensions were detected168,340 lines of code in 250 files:
LanguageFilesBlank linesComment linesLines of code
PO File3718,39525,29559,599
JavaScript1315,32418,52153,617
PHP1799,74817,42544,831
CSS177603227,154
SVG1002,672
Markdown12110429
JSON20038

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity68.91
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes91
▷ Abstract classes33.30%
▷ Concrete classes8896.70%
▷ Final classes00.00%
Methods1,839
▷ Static methods20911.36%
▷ Public methods1,46679.72%
▷ Protected methods150.82%
▷ Private methods35819.47%
Functions123
▷ Named functions123100.00%
▷ Anonymous functions00.00%
Constants133
▷ Global constants10881.20%
▷ Class constants2518.80%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/wp-sheet-editor-users/vendor/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
vendor/wp-sheet-editor-users/modules/wp-sheet-editor/assets/imgs/freemius-icon.png12.54KB6.09KB▼ 51.47%
vendor/wp-sheet-editor-users/modules/wp-sheet-editor/assets/vendor/images/chosen-sprite@2x.png0.72KB0.83KB0.00%
vendor/wp-sheet-editor-users/modules/wp-sheet-editor/assets/imgs/logo-248x102.png14.09KB5.48KB▼ 61.08%
vendor/wp-sheet-editor-users/assets/imgs/icon-20x20.png45.33KB0.51KB▼ 98.88%