90% woocommerce-product-sku-generator

Code Review | Product SKU Generator for WooCommerce

WordPress plugin Product SKU Generator for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 2.5.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 13, 2014
  • Latest release: Jul 28, 2023
  • Number of updates: 75
  • Update frequency: every 45.2 days
  • Top authors: beka.rice (54.67%)SkyVerge (46.67%)

Code review

54 tests

User reviews

19 reviews

Install metrics

10,000+ active /174,381 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.80ms] Passed 4 tests

A check of server-side resources used by Product SKU Generator for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0134.16 ▼4.96
Dashboard /wp-admin3.31 ▲0.0045.99 ▼6.33
Posts /wp-admin/edit.php3.36 ▲0.0051.02 ▲3.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.61 ▲1.10
Media Library /wp-admin/upload.php3.23 ▲0.0034.51 ▼0.99

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Product SKU Generator for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.23 ▼1.321.72 ▼0.1337.66 ▼8.88
Dashboard /wp-admin2,215 ▲334.85 ▼1.03106.75 ▲2.1842.69 ▼0.28
Posts /wp-admin/edit.php2,100 ▲81.98 ▼0.0240.72 ▼0.8438.79 ▲2.34
Add New Post /wp-admin/post-new.php1,540 ▲2023.15 ▼0.04589.54 ▼94.6158.28 ▼4.26
Media Library /wp-admin/upload.php1,400 ▲124.31 ▲0.0997.62 ▼12.4342.75 ▼5.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
4 plugin tags: sku generator, product sku, woocommerce, sku

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

The main file in "Product SKU Generator for WooCommerce" v. 2.5.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.6" instead of "3.9.4")

Code Analysis Passed 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 detected655 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1179280354
SVG101301

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods312.00%
▷ Public methods1768.00%
▷ Protected methods520.00%
▷ Private methods312.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.37MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png106.40KB46.41KB▼ 56.38%
assets/screenshot-4.png43.93KB13.34KB▼ 69.62%
assets/screenshot-3.png44.44KB13.67KB▼ 69.24%
assets/banner-772x250.png51.80KB22.30KB▼ 56.95%
assets/screenshot-5.png41.20KB10.69KB▼ 74.04%