78% edit-woocommerce-inventory-in-spreadsheet

Code Review | WooCommerce Stock Manager in Spreadsheet - WP Sheet Editor

WordPress plugin WooCommerce Stock Manager in Spreadsheet - WP Sheet Editor scored78%from 54 tests.

About plugin

  • Plugin page: edit-woocommerce-...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7.4
  • WordPress version: 6.3.1
  • First release: May 17, 2017
  • Latest release: Apr 22, 2018
  • Number of updates: 6
  • Update frequency: every 56.7 days
  • Top authors: JoseVega (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,192 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.42MB] [CPU: ▲4.00ms] Passed 4 tests

Server-side resources used by WooCommerce Stock Manager in Spreadsheet - WP Sheet Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4344.39 ▲1.52
Dashboard /wp-admin47.80 ▲44.459,138,583.63 ▲9,138,525.42
Posts /wp-admin/edit.php3.86 ▲0.4659.18 ▲7.85
Add New Post /wp-admin/post-new.php6.33 ▲0.40100.28 ▲0.98
Media Library /wp-admin/upload.php3.67 ▲0.4043.91 ▲5.63
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.8437.90

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Stock Manager in Spreadsheet - WP Sheet Editor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.26 ▼0.091.71 ▼0.1244.46 ▲1.01
Dashboard /wp-admin2,225 ▲485.62 ▼0.0394.04 ▲1.3246.84 ▲2.00
Posts /wp-admin/edit.php2,139 ▲392.19 ▲0.1545.69 ▲7.9443.06 ▲7.66
Add New Post /wp-admin/post-new.php1,552 ▲2623.26 ▲0.13619.00 ▼69.7157.68 ▲2.67
Media Library /wp-admin/upload.php1,441 ▲414.29 ▲0.0798.35 ▼10.4446.51 ▼0.25
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins9712.0527.0331.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=tgmpa-install-plugins
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=tgmpa-install-plugins
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant VGSE_WC_INVENTORY_DIR - assumed 'VGSE_WC_INVENTORY_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/edit-woocommerce-inventory-in-spreadsheet/inc/tgm-init.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/edit-woocommerce-inventory-in-spreadsheet/vendor/TGM-Plugin-Activation-2.5.2/class-tgm-plugin-activation.php:1853
    • > PHP Warning
      require_once(VGSE_WC_INVENTORY_DIR/vendor/TGM-Plugin-Activation-2.5.2/class-tgm-plugin-activation.php): failed to open stream: No such file or directory in wp-content/plugins/edit-woocommerce-inventory-in-spreadsheet/inc/tgm-init.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/edit-woocommerce-inventory-in-spreadsheet/vendor/TGM-Plugin-Activation-2.5.2/class-tgm-plugin-activation.php:1853
    • > PHP Fatal error
      require_once(): Failed opening required 'VGSE_WC_INVENTORY_DIR/vendor/TGM-Plugin-Activation-2.5.2/class-tgm-plugin-activation.php' (include_path='.:/usr/share/php') in wp-content/plugins/edit-woocommerce-inventory-in-spreadsheet/inc/tgm-init.php on line 21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed: The official readme.txt might help

edit-woocommerce-inventory-in-spreadsheet/woocommerce-inventory.php 92% from 13 tests

"WooCommerce Stock Manager in Spreadsheet - WP Sheet Editor" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("edit-woocommerce-inventory-in-spreadsheet.php" instead of "woocommerce-inventory.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,526 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP35251,5341,860
Markdown41720666

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity40.12
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods103
▷ Static methods65.83%
▷ Public methods8279.61%
▷ Protected methods2019.42%
▷ Private methods10.97%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin