100% add-to-cart-button-labels-for-woocommerce

Code Review | Add to Cart Button Labels for WooCommerce

WordPress plugin Add to Cart Button Labels for WooCommerce scored 100% from 54 tests.

About plugin

  • Plugin page: add-to-cart-butto...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8
  • WordPress version: 5.9.2
  • First release: Feb 10, 2017
  • Latest release: Sep 7, 2021
  • Number of updates: 18
  • Update frequency: every 92.7 days
  • Top authors: algoritmika (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active / 7,106 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
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼291.90ms] Passed 4 tests

A check of server-side resources used by Add to Cart Button Labels for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0157.74 ▲7.19
Dashboard /wp-admin3.41 ▲0.0135.09 ▼0.64
Posts /wp-admin/edit.php3.64 ▲0.0141.01 ▲3.64
Add New Post /wp-admin/post-new.php6.88 ▼0.0994.81 ▼1,169.35
Media Library /wp-admin/upload.php3.30 ▲0.0024.34 ▼1.25

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add to Cart Button Labels for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5315.83 ▲0.166.28 ▲0.123.03 ▲1.01
Dashboard /wp-admin2,888 ▲276.05 ▼0.11119.27 ▼18.62159.12 ▼2.04
Posts /wp-admin/edit.php2,688 ▼63.23 ▼0.0166.51 ▲0.83142.52 ▲1.19
Add New Post /wp-admin/post-new.php1,711 ▼4121.48 ▼0.09420.04 ▼69.69158.04 ▲2.86
Media Library /wp-admin/upload.php1,698 ▼05.52 ▲0.00145.65 ▲0.44185.58 ▲1.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
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
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: add to cart, woocommerce, woo commerce

add-to-cart-button-labels-for-woocommerce/add-to-cart-button-labels-for-woocommerce.php Passed 13 tests

The principal PHP file in "Add to Cart Button Labels for WooCommerce" v. 2.0.0 is loaded by WordPress automatically on each request
66 characters long description:
Customize "Add to cart" button labels in WooCommerce. Beautifully.

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
Good job! No executable or dangerous file extensions detected1,195 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP151886221,195

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity9.86
▷ Minimum class complexity2.00
▷ Maximum class complexity24.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes17.14%
Methods69
▷ Static methods11.45%
▷ Public methods69100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin