99% add-to-cart-button-customizations

Code Review | WooCommerce Add To Cart Button Customizations

WordPress plugin WooCommerce Add To Cart Button Customizations scored 99% from 54 tests.

About plugin

  • Plugin page: add-to-cart-butto...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9
  • WordPress version: 5.9.2
  • First release: Mar 20, 2021
  • Latest release: Feb 16, 2022
  • Number of updates: 6
  • Update frequency: every 55.7 days
  • Top authors: ruhel241 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 964 total downloads

Benchmarks

Plugin footprint Passed 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.05MB] [CPU: ▼289.20ms] Passed 4 tests

A check of server-side resources used by WooCommerce Add To Cart Button Customizations
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1457.42 ▲4.90
Dashboard /wp-admin3.49 ▲0.0834.58 ▲1.67
Posts /wp-admin/edit.php3.71 ▲0.0738.61 ▲2.47
Add New Post /wp-admin/post-new.php6.95 ▼0.02102.17 ▼1,162.29
Media Library /wp-admin/upload.php3.36 ▲0.0725.22 ▲1.35

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WooCommerce Add To Cart Button Customizations: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,841 ▲8716.37 ▲0.786.76 ▲0.483.08 ▲0.70
Dashboard /wp-admin2,919 ▲586.08 ▼0.04120.13 ▼20.92154.68 ▼7.72
Posts /wp-admin/edit.php2,694 ▼03.23 ▲0.0061.65 ▼3.52140.79 ▼2.25
Add New Post /wp-admin/post-new.php1,668 ▲718.66 ▲2.53417.07 ▲2.16151.64 ▼7.54
Media Library /wp-admin/upload.php1,698 ▼05.51 ▼0.00137.83 ▼9.39193.36 ▼4.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
Attributes that require attention:
  • Requires php: Version format is invalid
You can look at the official readme.txt

add-to-cart-button-customizations/wooaddtocart.php 85% from 13 tests

Analyzing the main PHP file in "WooCommerce Add To Cart Button Customizations" version 1.3.0
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("add-to-cart-button-customizations.php" instead of "wooaddtocart.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin509 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP710185480
CSS15029

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.32
Average class complexity8.40
▷ Minimum class complexity2.00
▷ Maximum class complexity19.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods22
▷ Static methods1150.00%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin