93% woocommerce-radio-buttons

Code Review | Woocommerce Radio Buttons

WordPress plugin Woocommerce Radio Buttons scored 93% from 54 tests.

About plugin

  • Plugin page: woocommerce-radio...
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 5.8.1
  • First release: Dec 27, 2012
  • Latest release: Feb 19, 2014
  • Number of updates: 14
  • Update frequency: every 30.1 days
  • Top authors: DesignLoud (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

600+ active / 22,928 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Woocommerce Radio Buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0126.67 ▲3.19
Dashboard /wp-admin3.07 ▲0.0031.43 ▼11.70
Posts /wp-admin/edit.php3.12 ▲0.0129.61 ▼1.32
Add New Post /wp-admin/post-new.php5.43 ▼0.0168.94 ▼565.90
Media Library /wp-admin/upload.php3.01 ▲0.0123.09 ▼2.45

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce Radio Buttons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,716 ▲9016.02 ▲0.065.29 ▼4.1273.03 ▼4.93
Dashboard /wp-admin2,930 ▲316.12 ▼0.11114.61 ▼17.02161.71 ▼21.96
Posts /wp-admin/edit.php2,706 ▼313.24 ▲0.0165.58 ▲2.32135.43 ▼4.36
Add New Post /wp-admin/post-new.php3,807 ▲6418.11 ▼1.02438.39 ▼16.28159.22 ▼4.01
Media Library /wp-admin/upload.php1,749 ▼35.54 ▼0.02141.43 ▼0.57185.26 ▼0.92

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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: Call to undefined function apply_filters() in wp-content/plugins/woocommerce-radio-buttons/functions.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #2 ()
Please take inspiration from this readme.txt

woocommerce-radio-buttons/functions.php 85% from 13 tests

"Woocommerce Radio Buttons" version 3.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 491 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-radio-buttons.php" instead of "functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin358 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript210738264
PHP2252494

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png75.03KB23.67KB▼ 68.45%