84% easy-woocommerce-auto-sku-generator

Code Review | Easy Auto SKU Generator for WooCommerce

WordPress plugin Easy Auto SKU Generator for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: easy-woocommerce-...
  • Plugin version: 1.1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-6.3
  • WordPress version: 6.3.1
  • First release: May 21, 2019
  • Latest release: Oct 25, 2023
  • Number of updates: 105
  • Update frequency: every 15.4 days
  • Top authors: alexodiy (100%)

Code review

54 tests

User reviews

210 reviews

Install metrics

10,000+ active /109,390 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Easy Auto SKU Generator for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.79 ▲1.75
Dashboard /wp-admin3.33 ▲0.0349.59 ▲2.08
Posts /wp-admin/edit.php3.38 ▲0.0347.92 ▲2.88
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.07 ▼6.16
Media Library /wp-admin/upload.php3.25 ▲0.0235.80 ▼0.76

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
glideffxf_data_install
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Auto SKU Generator for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.26 ▼0.332.06 ▲0.4243.34 ▲3.93
Dashboard /wp-admin2,204 ▲235.63 ▼0.0684.36 ▼17.0340.44 ▼1.24
Posts /wp-admin/edit.php2,106 ▲62.06 ▲0.0635.45 ▲1.5834.67 ▼2.73
Add New Post /wp-admin/post-new.php1,370 ▼15716.48 ▼6.39544.02 ▼128.2848.61 ▼14.36
Media Library /wp-admin/upload.php1,400 ▼04.38 ▲0.1895.72 ▼19.5442.50 ▼4.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-woocommerce-auto-sku-generator/inc/generate_all.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-woocommerce-auto-sku-generator/inc/skuautoffxf_rate.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-woocommerce-auto-sku-generator/inc/generate_category.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-woocommerce-auto-sku-generator/inc/skuautoffxf_all_settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-woocommerce-auto-sku-generator/inc/skuautoffxf_setting_block_and_generator.php:137

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt is a good inspiration

easy-woocommerce-auto-sku-generator/easy-woocommerce-auto-sku-generator.php 92% from 13 tests

The principal PHP file in "Easy Auto SKU Generator for WooCommerce" v. 1.1.8 is loaded by WordPress automatically on each request
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.8" instead of "3.3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin2,730 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS3194121,221
PHP83161671,134
JavaScript811517375

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions2596.15%
▷ Anonymous functions13.85%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin