10% simple-sku-generator

Code Review | Simple SKU Generator

WordPress plugin Simple SKU Generator scored10%from 54 tests.

About plugin

  • Plugin page: simple-sku-generator
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-5.6.0
  • WordPress version: 6.3.1
  • First release: Jul 2, 2017
  • Latest release: Apr 6, 2022
  • Number of updates: 117
  • Update frequency: every 14.9 days
  • Top authors: hpgong (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,945 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method HP_Simple_SKU::activate_hp_sku_var_generator() should not be called statically

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

An overview of server-side resources used by Simple SKU Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.81 ▲5.70
Dashboard /wp-admin3.31 ▲0.0047.01 ▼1.44
Posts /wp-admin/edit.php3.36 ▲0.0042.47 ▼1.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.32 ▲0.54
Media Library /wp-admin/upload.php3.23 ▲0.0033.78 ▼3.22

Server storage [IO: ▲0.11MB] [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: 8 new files
Database: 2 new tables, 6 new options
New tables
wp_woo_sku1
wp_woo_sku2
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Simple SKU Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.23 ▼1.401.81 ▲0.2044.75 ▲0.38
Dashboard /wp-admin2,203 ▲114.84 ▼0.13101.69 ▼4.1937.93 ▼3.53
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0233.99 ▲0.2432.32 ▼2.48
Add New Post /wp-admin/post-new.php1,542 ▲2318.33 ▼4.86626.09 ▼92.6953.23 ▼28.83
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0395.48 ▼6.4642.10 ▼4.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method HP_Simple_SKU::uninstall_hp_sku_var_generator() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8 in simple-sku-generator/assets to your readme.txt
  • Donate link: Please fix this invalid URI: "N/A"
You can take inspiration from this readme.txt

simple-sku-generator/hp-sku-var-generator.php 92% from 13 tests

The main file in "Simple SKU Generator" v. 1.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-sku-generator.php" instead of "hp-sku-var-generator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,016 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2204225564
PHP23535440
CSS113112

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon.png20.63KB0.63KB▼ 96.93%