90% atr-random-sku-for-woocommerce

Code Review | SKU generator for Woocommerce by ATR

WordPress plugin SKU generator for Woocommerce by ATR scored90%from 54 tests.

About plugin

  • Plugin page: atr-random-sku-fo...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.1
  • WordPress version: 6.3.1
  • First release: Dec 29, 2015
  • Latest release: Nov 3, 2022
  • Number of updates: 63
  • Update frequency: every 39.7 days
  • Top authors: yehudaT (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /4,413 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼4.27ms] Passed 4 tests

Analyzing server-side resources used by SKU generator for Woocommerce by ATR
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.31 ▼3.99
Dashboard /wp-admin3.47 ▲0.1653.46 ▲2.08
Posts /wp-admin/edit.php3.58 ▲0.2248.55 ▲1.34
Add New Post /wp-admin/post-new.php6.07 ▲0.1886.01 ▼16.51
Media Library /wp-admin/upload.php3.39 ▲0.1639.22 ▲4.79
ATR rand sku Woo /wp-admin/options-general.php?page=atr_random_sku_for_woocommerce_settings3.3736.57

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
atr_random_sku_for_woocommerce_version

Browser metrics Passed 4 tests

Checking browser requirements for SKU generator for Woocommerce by ATR
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1414.34 ▼0.191.47 ▼0.5341.71 ▼3.86
Dashboard /wp-admin2,206 ▲325.63 ▼0.0391.07 ▼3.3038.69 ▼5.82
Posts /wp-admin/edit.php2,108 ▲82.05 ▲0.0437.04 ▼4.6035.12 ▲0.00
Add New Post /wp-admin/post-new.php1,536 ▲1023.43 ▼0.27688.82 ▲14.4563.34 ▲12.31
Media Library /wp-admin/upload.php1,411 ▲144.19 ▲0.03112.21 ▲8.7446.98 ▲2.86
ATR rand sku Woo /wp-admin/options-general.php?page=atr_random_sku_for_woocommerce_settings9822.1125.8329.30

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • atr_random_sku_for_woocommerce_version
    • widget_recent-posts
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: sku generator, sku, product sku, woocommerce

atr-random-sku-for-woocommerce/atr-random-sku-for-woocommerce.php 92% from 13 tests

The primary PHP file in "SKU generator for Woocommerce by ATR" version 2.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 178 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected771 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6205387639
PO File1212367
JavaScript17543
CSS13922

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity28.67
▷ Minimum class complexity21.00
▷ Maximum class complexity39.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3594.59%
▷ Protected methods00.00%
▷ Private methods25.41%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin