83% woo-custom-cart-button

Code Review | Custom Add to Cart Button Label and Link

WordPress plugin Custom Add to Cart Button Label and Link scored83%from 54 tests.

About plugin

  • Plugin page: woo-custom-cart-b...
  • Plugin version: 1.5.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Sep 10, 2019
  • Latest release: Mar 18, 2023
  • Number of updates: 51
  • Update frequency: every 25.2 days
  • Top authors: coder426 (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

4,000+ active /55,211 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Custom Add to Cart Button Label and Link
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.67 ▼2.33
Dashboard /wp-admin3.31 ▼0.0446.36 ▼11.64
Posts /wp-admin/edit.php3.36 ▲0.0044.12 ▼1.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.32 ▼15.25
Media Library /wp-admin/upload.php3.23 ▲0.0032.24 ▼2.72

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 66 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Custom Add to Cart Button Label and Link: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.321.74 ▲0.0243.37 ▲1.72
Dashboard /wp-admin2,195 ▲185.59 ▼0.0483.14 ▼8.4139.65 ▲0.09
Posts /wp-admin/edit.php2,097 ▼02.02 ▼0.0235.16 ▲0.4032.57 ▼6.43
Add New Post /wp-admin/post-new.php1,533 ▲723.22 ▲0.10588.35 ▼147.1746.48 ▼11.81
Media Library /wp-admin/upload.php1,397 ▼04.20 ▲0.00101.91 ▼0.4042.37 ▼4.76

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: catcbll_btn_icon_psn in wp-content/plugins/woo-custom-cart-button/include/admin/wcatcbll_general_settings.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-custom-cart-button/public/wcatcbll_single_product.php:114
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-custom-cart-button/include/wcatcbll_shortcode.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-custom-cart-button/include/wcatcbll_widget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-custom-cart-button/include/functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-custom-cart-button/include/wcatcbll_metabox.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-custom-cart-button/public/wcatcbll_all_settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/woo-custom-cart-button/include/admin/wcatcbll_setting_modal_popup.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/woo-custom-cart-button/include/wcatcbll_inscrpt.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-custom-cart-button/include/wcatcbll_btn_2dhvr.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Requires php: Invalid plugin version format
  • Tags: There are too many tags (21 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (Plugin activation page) image not found
The official readme.txt might help

woo-custom-cart-button/catcbll.php 77% from 13 tests

This is the main PHP file of "Custom Add to Cart Button Label and Link" version 1.5.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • 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
  • Description: The description should be shorter than 140 characters (currently 143 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-custom-cart-button.php" instead of "catcbll.php")

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
There were no executable files found in this plugin11,702 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
CSS77891764,989
PO File101,8892,4233,569
PHP151351272,816
JavaScript74444326
SVG1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity12.00
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/noties-banner.png15.29KB6.28KB▼ 58.91%
assets/img/logo.png5.11KB3.28KB▼ 35.80%