84% wc-variations-generator

Code Review | Variations Generator & Mass Edit for WooCommerce

WordPress plugin Variations Generator & Mass Edit for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-variations-gen...
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 9, 2020
  • Latest release: May 2, 2020
  • Number of updates: 8
  • Update frequency: every 2.9 days
  • Top authors: anheco (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /1,068 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
Installer ran successfully

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

A check of server-side resources used by Variations Generator & Mass Edit for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.12 ▼1.97
Dashboard /wp-admin3.31 ▲0.0047.57 ▼3.03
Posts /wp-admin/edit.php3.36 ▲0.0043.59 ▼7.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.25 ▼3.28
Media Library /wp-admin/upload.php3.23 ▲0.0033.29 ▼2.07

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Variations Generator & Mass Edit for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.20 ▼1.184.91 ▲2.7341.77 ▼10.93
Dashboard /wp-admin2,203 ▲154.87 ▼1.03113.20 ▼0.9443.30 ▼2.46
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0135.76 ▲0.6733.20 ▼4.54
Add New Post /wp-admin/post-new.php1,514 ▼2023.46 ▲0.23672.41 ▼39.8254.17 ▼2.92
Media Library /wp-admin/upload.php1,388 ▼04.27 ▲0.0796.66 ▼10.9142.84 ▼2.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wc-variations-generator/templates/generator.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
No plugin tags provided

wc-variations-generator/wc-variations-generator.php 85% from 13 tests

"Variations Generator & Mass Edit for WooCommerce" version 2.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages/")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected685 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP225564537
PO File171134146
CSS1001
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity98.00
▷ Minimum class complexity98.00
▷ Maximum class complexity98.00
Average method complexity7.31
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods960.00%
▷ Protected methods00.00%
▷ Private methods640.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin