90% change-add-to-cart-button-text-wc

Code Review | Change Add To Cart Button Text WC

WordPress plugin Change Add To Cart Button Text WC scored90%from 54 tests.

About plugin

  • Plugin page: change-add-to-car...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3
  • WordPress version: 6.3.1
  • First release: May 15, 2020
  • Latest release: May 19, 2020
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: dipendesai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /380 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

This is a short check of server-side resources used by Change Add To Cart Button Text WC
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.03 ▼5.83
Dashboard /wp-admin3.34 ▼0.0146.03 ▼19.06
Posts /wp-admin/edit.php3.39 ▲0.0350.42 ▼0.83
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.72 ▼0.78
Media Library /wp-admin/upload.php3.26 ▲0.0333.39 ▼2.10

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Change Add To Cart Button Text WC
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲4513.57 ▼0.811.61 ▼0.4239.89 ▼2.25
Dashboard /wp-admin2,222 ▲374.86 ▼0.96109.62 ▲3.1845.20 ▲3.07
Posts /wp-admin/edit.php2,105 ▲161.99 ▼0.0439.34 ▼2.3934.66 ▼2.60
Add New Post /wp-admin/post-new.php1,546 ▲2722.86 ▼0.22628.94 ▼33.5051.95 ▼4.88
Media Library /wp-admin/upload.php1,404 ▲164.16 ▼0.0594.59 ▼1.2640.76 ▼4.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

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

change-add-to-cart-button-text-wc/change-add-to-cart-button-text-wc.php 92% from 13 tests

"Change Add To Cart Button Text WC" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Good job! No executable or dangerous file extensions detected117 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12911117

PHP code Passed 2 tests

This is a short overview 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.76
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin