99% add-to-cart-button-custom-text

Code Review | Add to Cart Button Custom Text

WordPress plugin Add to Cart Button Custom Text scored 99% from 54 tests.

About plugin

  • Plugin page: add-to-cart-butto...
  • Plugin version: 3.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.9.2
  • First release: Jan 29, 2016
  • Latest release: Dec 9, 2021
  • Number of updates: 60
  • Update frequency: every 35.7 days
  • Top authors: enriquejros (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

10,000+ active / 83,099 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼287.42ms] Passed 4 tests

This is a short check of server-side resources used by Add to Cart Button Custom Text
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1561.19 ▲4.40
Dashboard /wp-admin3.49 ▲0.0939.38 ▲1.81
Posts /wp-admin/edit.php3.72 ▲0.0848.89 ▲6.26
Add New Post /wp-admin/post-new.php6.96 ▼0.01101.78 ▼1,154.98
Media Library /wp-admin/upload.php3.37 ▲0.0826.98 ▼0.89

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

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

Browser metrics Passed 4 tests

Add to Cart Button Custom Text: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,833 ▲8815.88 ▲0.145.83 ▼0.352.71 ▲0.64
Dashboard /wp-admin2,933 ▲726.16 ▼0.02122.32 ▼14.18157.80 ▼6.07
Posts /wp-admin/edit.php2,743 ▲523.37 ▲0.1266.68 ▲3.60141.28 ▼0.19
Add New Post /wp-admin/post-new.php1,704 ▼1519.21 ▲1.76390.14 ▼36.84157.63 ▲0.71
Media Library /wp-admin/upload.php1,750 ▲555.46 ▼0.10143.27 ▼8.02192.06 ▼1.37

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 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

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


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: woocommerce, change, add to cart, button

add-to-cart-button-custom-text/add-to-cart-custom-text.php 77% from 13 tests

The principal PHP file in "Add to Cart Button Custom Text" v. 3.0.6 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "5.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("add-to-cart-button-custom-text.php" instead of "add-to-cart-custom-text.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin466 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PO File23137117

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.67
▷ Minimum class complexity12.00
▷ Maximum class complexity18.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods15.88%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
▷ Named functions00.00%
▷ Anonymous functions2100.00%
▷ 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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png10.75KB4.14KB▼ 61.45%