89% woo-variations-style-buttons

Code Review | Woo Variations Style Buttons

WordPress plugin Woo Variations Style Buttons scored89%from 54 tests.

About plugin

  • Plugin page: woo-variations-st...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0
  • WordPress version: 6.3.1
  • First release: Dec 23, 2016
  • Latest release: Dec 8, 2018
  • Number of updates: 46
  • Update frequency: every 15.5 days
  • Top authors: proscriptsell (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

200+ active /11,930 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by Woo Variations Style Buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.77 ▼0.55
Dashboard /wp-admin3.31 ▼0.0347.31 ▼11.78
Posts /wp-admin/edit.php3.36 ▲0.0147.93 ▲0.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.48 ▼16.00
Media Library /wp-admin/upload.php3.24 ▲0.0134.88 ▲2.94

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Variations Style Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.33 ▼1.262.10 ▲0.3141.64 ▲0.09
Dashboard /wp-admin2,209 ▲214.86 ▼0.02102.12 ▼2.3238.64 ▲1.74
Posts /wp-admin/edit.php2,092 ▼02.06 ▲0.0537.26 ▲0.4634.74 ▲1.87
Add New Post /wp-admin/post-new.php1,533 ▲1923.33 ▲5.87667.05 ▼30.4560.70 ▲16.95
Media Library /wp-admin/upload.php1,385 ▼64.21 ▼0.0198.02 ▼4.0841.84 ▼3.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Previews), #2 (Settings Page), #3 (Adding a button in a single product page)
  • Tags: There are too many tags (15 tag instead of maximum 10)
You can look at the official readme.txt

woo-variations-style-buttons/woo-variations-style-buttons.php Passed 13 tests

The principal PHP file in "Woo Variations Style Buttons" v. 1.4 is loaded by WordPress automatically on each request
125 characters long description:
Variations Link, Color, Images, Radio, Select Buttons for WooCommerce. product variations using buttons instead of dropdowns.

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
Success! There were no dangerous files found in this plugin1,791 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP623562999
JavaScript210498513
CSS284166
PO File1272780
SVG10133

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity23.25
▷ Minimum class complexity5.00
▷ Maximum class complexity50.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.47MB with 0.20MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/checkmark.png0.49KB0.59KB0.00%
screenshot-1.png393.21KB93.06KB▼ 76.33%
screenshot-3.png20.50KB10.10KB▼ 50.76%
screenshot-2.png68.06KB36.84KB▼ 45.87%