77% woo-add-to-cart-text-change

Code Review | Add to Cart Text Changer and Customize Button, Add Custom Icon

WordPress plugin Add to Cart Text Changer and Customize Button, Add Custom Icon scored77%from 54 tests.

About plugin

  • Plugin page: woo-add-to-cart-t...
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 27, 2017
  • Latest release: Jun 20, 2023
  • Number of updates: 44
  • Update frequency: every 49.0 days
  • Top authors: codersaiful (88.64%)codeastrology (13.64%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active /24,537 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
This plugin's installer ran successfully

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

A check of server-side resources used by Add to Cart Text Changer and Customize Button, Add Custom Icon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.07 ▼5.46
Dashboard /wp-admin3.31 ▲0.0144.66 ▼4.04
Posts /wp-admin/edit.php3.36 ▲0.0147.23 ▼4.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.71 ▼6.19
Media Library /wp-admin/upload.php3.23 ▲0.0132.90 ▼3.92

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Add to Cart Text Changer and Customize Button, Add Custom Icon
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.27 ▼1.391.59 ▲0.0137.13 ▼9.40
Dashboard /wp-admin2,222 ▲314.85 ▼0.24109.32 ▲8.8143.28 ▼0.41
Posts /wp-admin/edit.php2,107 ▲152.01 ▼0.0442.29 ▼1.6642.00 ▲6.67
Add New Post /wp-admin/post-new.php1,557 ▲2418.35 ▼4.67617.49 ▼36.7656.27 ▼1.71
Media Library /wp-admin/upload.php1,410 ▲284.24 ▼0.0199.49 ▼0.7244.12 ▼0.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-add-to-cart-text-change/index.php
    • > /wp-content/plugins/woo-add-to-cart-text-change/includes/add_to_cart_front.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-add-to-cart-text-change/admin/plugin_setting_link.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-add-to-cart-text-change/admin/menu.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

woo-add-to-cart-text-change/index.php 62% from 13 tests

The primary PHP file in "Add to Cart Text Changer and Customize Button, Add Custom Icon" version 2.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "4.0.0")
  • Description: Please don't use more than 140 characters for the plugin description (currently 283 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-add-to-cart-text-change.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin247 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP645115239
CSS1108

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
18 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/blue.png0.58KB0.42KB▼ 27.10%
images/default.png4.37KB1.49KB▼ 66.04%
images/rate_us.png45.85KB19.09KB▼ 58.35%
images/add_cart_red_black.png0.58KB0.53KB▼ 8.94%
images/orrange.png0.63KB0.60KB▼ 5.69%