100% add-to-cart-text

Code Review | Add to Cart Text

WordPress plugin Add to Cart Text scored 100% from 54 tests.

About plugin

  • Plugin page: add-to-cart-text
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.6
  • WordPress version: 5.8.1
  • First release: Jan 26, 2021
  • Latest release: Jan 26, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: KeyvaHardani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 99 total downloads


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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼137.94ms] Passed 4 tests

A check of server-side resources used by Add to Cart Text
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1336.06 ▲10.20
Dashboard /wp-admin3.07 ▲0.0148.02 ▲1.35
Posts /wp-admin/edit.php3.12 ▲0.0149.12 ▲3.76
Add New Post /wp-admin/post-new.php5.43 ▼0.0194.42 ▼558.13
Media Library /wp-admin/upload.php3.01 ▲0.0135.87 ▲1.27

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Add to Cart Text
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.91 ▼0.067.81 ▼0.1249.69 ▲0.29
Dashboard /wp-admin2,989 ▲556.09 ▲0.17144.60 ▼4.36117.94 ▲3.99
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0273.12 ▲4.0090.68 ▼7.00
Add New Post /wp-admin/post-new.php1,683 ▲9218.55 ▲0.09388.71 ▼22.80110.13 ▼0.06
Media Library /wp-admin/upload.php1,810 ▲35.08 ▲0.06144.22 ▼12.30128.82 ▲3.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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
The smoke test was a success, however most plugin functionality was not tested

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

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


Plugin configuration 97% 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:
  • Screenshots: Screenshot #1 (Settings) image not found
The official readme.txt is a good inspiration

add-to-cart-text/add-to-cart-text.php Passed 13 tests

The main PHP script in "Add to Cart Text" version 1.0 is automatically included on every request by WordPress
98 characters long description:
This plugin helps you change the WooCommerce "add to cart" text on single and multi product pages.

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
No dangerous file extensions were detected52 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png27.38KB12.39KB▼ 54.76%