84% variations-radio-buttons-for-woocommerce

Code Review | Radio Buttons and Swatches for WooCommerce

WordPress plugin Radio Buttons and Swatches for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: variations-radio-...
  • Plugin version: 1.1.19
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 11, 2020
  • Latest release: Jun 13, 2023
  • Number of updates: 32
  • Update frequency: every 31.4 days
  • Top authors: oneteamsoftware (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,734 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼7.09ms] Passed 4 tests

An overview of server-side resources used by Radio Buttons and Swatches for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1433.61 ▼8.40
Dashboard /wp-admin3.45 ▲0.1045.56 ▼12.21
Posts /wp-admin/edit.php3.56 ▲0.2046.93 ▲1.70
Add New Post /wp-admin/post-new.php6.03 ▲0.1484.02 ▼9.46
Media Library /wp-admin/upload.php3.37 ▲0.1435.85 ▲2.76

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Radio Buttons and Swatches for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.85 ▲0.201.75 ▼0.0140.95 ▼0.93
Dashboard /wp-admin2,218 ▲275.79 ▲0.86107.34 ▲6.4941.96 ▼1.39
Posts /wp-admin/edit.php2,100 ▲142.03 ▲0.0334.36 ▼1.9835.47 ▼0.26
Add New Post /wp-admin/post-new.php1,541 ▲2223.36 ▲0.17605.91 ▼76.6149.92 ▼14.41
Media Library /wp-admin/upload.php1,400 ▲154.24 ▲0.0497.77 ▼1.7542.96 ▼0.73

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/variations-radio-buttons-for-woocommerce/templates/variations-radio-buttons-for-woocommerce/option.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/variations-radio-buttons-for-woocommerce/templates/variations-radio-buttons-for-woocommerce/selector.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 Passed 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
9 plugin tags: woo, woocommerce variations, radio buttons, woocommerce swatches, swatches...

variations-radio-buttons-for-woocommerce/variations-radio-buttons-for-woocommerce.php Passed 13 tests

The main PHP file in "Radio Buttons and Swatches for WooCommerce" ver. 1.1.19 adds more information about the plugin and also serves as the entry point for this plugin
72 characters long description:
Increase conversions by displaying beautiful radio buttons and swatches.

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
Good job! No executable or dangerous file extensions detected21,460 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
CSS65,71111517,255
PHP247645243,925
JavaScript46741280

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity21.45
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes20
▷ Abstract classes315.00%
▷ Concrete classes1785.00%
▷ Final classes00.00%
Methods179
▷ Static methods10.56%
▷ Public methods10759.78%
▷ Protected methods6737.43%
▷ Private methods52.79%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/1TeamSoftware-logo.png14.55KB4.50KB▼ 69.05%
assets/images/1TeamSoftware-icon.png0.59KB0.75KB0.00%