90% wpc-variations-radio-buttons

Code Review | WPC Variations Radio Buttons for WooCommerce

WordPress plugin WPC Variations Radio Buttons for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wpc-variations-ra...
  • Plugin version: 3.4.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 9, 2019
  • Latest release: Nov 15, 2023
  • Number of updates: 112
  • Update frequency: every 13.9 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

7,000+ active /218,709 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.03MB] [CPU: ▲0.16ms] Passed 4 tests

An overview of server-side resources used by WPC Variations Radio Buttons for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.31 ▲3.20
Dashboard /wp-admin3.33 ▲0.0247.05 ▼0.09
Posts /wp-admin/edit.php3.44 ▲0.0846.63 ▲1.44
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.73 ▼3.74
Media Library /wp-admin/upload.php3.25 ▲0.0235.16 ▲3.05
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.5631.35
About /wp-admin/admin.php?page=wpclever3.2130.67

Server storage [IO: ▲0.17MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WPC Variations Radio Buttons for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲10514.61 ▲0.351.89 ▲0.1740.20 ▼5.02
Dashboard /wp-admin2,257 ▲775.56 ▼0.0795.85 ▲5.5679.92 ▲37.54
Posts /wp-admin/edit.php2,182 ▲851.98 ▲0.0438.79 ▲1.5034.76 ▼3.43
Add New Post /wp-admin/post-new.php1,753 ▲22721.70 ▼1.86804.72 ▲181.3180.26 ▲24.40
Media Library /wp-admin/upload.php1,474 ▲774.18 ▼0.02102.88 ▼4.1872.76 ▲29.38
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7442.1334.0356.24
About /wp-admin/admin.php?page=wpclever1,3992.2336.0138.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention: Please take inspiration from this readme.txt

wpc-variations-radio-buttons/wpc-variations-radio-buttons.php Passed 13 tests

The main file in "WPC Variations Radio Buttons for WooCommerce" v. 3.4.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
126 characters long description:
WPC Variations Radio Buttons will replace dropdown select with radio buttons for the buyer easier in selecting the variations.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin2,916 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP5223531,300
CSS414811728
JavaScript612167635
PO File282129224
SVG10029

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity48.75
▷ Minimum class complexity1.00
▷ Maximum class complexity147.00
Average method complexity5.44
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods43
▷ Static methods716.28%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants10
▷ Global constants10100.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
There are no PNG files in this plugin