84% autosku-for-woocommerce-variable-products

Code Review | autoSKU for WooCommerce Variable Products

WordPress plugin autoSKU for WooCommerce Variable Products scored84%from 54 tests.

About plugin

  • Plugin page: autosku-for-wooco...
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Dec 31, 2014
  • Latest release: Oct 4, 2018
  • Number of updates: 14
  • Update frequency: every 98.1 days
  • Top authors: labdav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,357 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by autoSKU for WooCommerce Variable Products
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.52 ▼5.09
Dashboard /wp-admin3.31 ▼0.0349.21 ▼9.94
Posts /wp-admin/edit.php3.36 ▲0.0143.02 ▼2.78
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.95 ▼3.91
Media Library /wp-admin/upload.php3.23 ▲0.0133.28 ▲0.26

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for autoSKU for WooCommerce Variable Products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.26 ▼0.092.00 ▲0.1838.67 ▼1.54
Dashboard /wp-admin2,195 ▲155.56 ▼0.0993.37 ▲9.3742.41 ▲4.06
Posts /wp-admin/edit.php2,100 ▲32.01 ▼0.0034.92 ▼0.4833.99 ▼3.93
Add New Post /wp-admin/post-new.php1,526 ▼023.23 ▼0.37694.98 ▼25.8155.58 ▲4.23
Media Library /wp-admin/upload.php1,394 ▼94.19 ▲0.0295.58 ▼4.3241.46 ▼3.39

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_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/autosku-for-woocommerce-variable-products/autosku.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: ldav, woocommerce, autosku, sku

autosku-for-woocommerce-variable-products/autosku.php 85% from 13 tests

"autoSKU for WooCommerce Variable Products" version 0.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("autosku-for-woocommerce-variable-products.php" instead of "autosku.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
No dangerous file extensions were detected73 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PO File13239
PHP151434

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
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
There were not PNG files found in your plugin