90% sku-for-woocommerce

Code Review | SKU Generator for WooCommerce

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

About plugin

  • Plugin page: sku-for-woocommerce
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Aug 8, 2015
  • Latest release: Jul 15, 2023
  • Number of updates: 63
  • Update frequency: every 46.0 days
  • Top authors: wpwham (53.97%)algoritmika (47.62%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /28,570 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.66ms] Passed 4 tests

An overview of server-side resources used by SKU Generator for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0239.00 ▲1.22
Dashboard /wp-admin3.36 ▼0.0245.62 ▼16.47
Posts /wp-admin/edit.php3.41 ▲0.0251.83 ▲0.57
Add New Post /wp-admin/post-new.php5.94 ▲0.0291.98 ▼19.85
Media Library /wp-admin/upload.php3.28 ▲0.0234.72 ▲1.13

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

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

Browser metrics Passed 4 tests

SKU Generator for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.72 ▼0.571.82 ▲0.0344.73 ▲0.91
Dashboard /wp-admin2,206 ▲215.90 ▲0.99108.46 ▲5.1936.43 ▼5.74
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0439.58 ▼0.4934.39 ▲0.16
Add New Post /wp-admin/post-new.php1,514 ▼517.64 ▼5.72646.64 ▼28.4360.55 ▲11.19
Media Library /wp-admin/upload.php1,382 ▼94.23 ▼0.02101.24 ▲2.5341.07 ▼3.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce, generate sku, sku, stock keeping unit, generate

sku-for-woocommerce/sku-for-woocommerce.php Passed 13 tests

The entry point to "SKU Generator for WooCommerce" version 1.6.1 is a PHP file that has certain tags in its header comment area
36 characters long description:
Add full SKU support to WooCommerce.

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
Good job! No executable or dangerous file extensions detected979 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8127404979

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity15.88
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods49
▷ Static methods510.20%
▷ Public methods49100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin