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

Code Review | Add to Cart Button Custom Text

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

About plugin

  • Plugin page: add-to-cart-butto...
  • Plugin version: 4.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 29, 2016
  • Latest release: May 28, 2023
  • Number of updates: 69
  • Update frequency: every 38.8 days
  • Top authors: enriquejros (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

10,000+ active /121,620 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.70ms] Passed 4 tests

An overview of server-side resources used by Add to Cart Button Custom Text
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.03 ▼3.61
Dashboard /wp-admin3.39 ▲0.0851.06 ▼1.37
Posts /wp-admin/edit.php3.50 ▲0.1451.17 ▼4.79
Add New Post /wp-admin/post-new.php5.97 ▲0.0891.79 ▼5.02
Media Library /wp-admin/upload.php3.31 ▲0.0842.08 ▲2.20

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add to Cart Button Custom Text
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲11713.31 ▼1.122.01 ▲0.1940.30 ▼6.94
Dashboard /wp-admin2,247 ▲624.86 ▼0.06105.96 ▼5.4941.47 ▲1.11
Posts /wp-admin/edit.php2,127 ▲382.19 ▲0.1441.82 ▲6.1237.10 ▲3.17
Add New Post /wp-admin/post-new.php1,561 ▲2823.63 ▲0.53659.24 ▲24.4661.51 ▲8.18
Media Library /wp-admin/upload.php1,429 ▲414.13 ▼0.18112.50 ▲1.2752.03 ▲4.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: woocommerce, change, add to cart, button

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

The entry point to "Add to Cart Button Custom Text" version 4.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin471 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP418874333
PO File23137117
XML20021

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.00
▷ Minimum class complexity13.00
▷ Maximum class complexity18.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in 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%