88% add-to-cart-button-customizer

Code Review | Add To Cart Button Customizer

WordPress plugin Add To Cart Button Customizer scored88%from 54 tests.

About plugin

  • Plugin page: add-to-cart-butto...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 17, 2023
  • Latest release: Oct 11, 2023
  • Number of updates: 18
  • Update frequency: every 6.5 days
  • Top authors: wpcloudtechnologies (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /322 total downloads

Benchmarks

Plugin footprint 83% from 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.17ms] Passed 4 tests

A check of server-side resources used by Add To Cart Button Customizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.51 ▲1.40
Dashboard /wp-admin3.31 ▲0.0049.60 ▼3.08
Posts /wp-admin/edit.php3.36 ▲0.0049.07 ▼1.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.68 ▼14.15
Media Library /wp-admin/upload.php3.23 ▲0.0034.41 ▼1.94

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add To Cart Button Customizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲1114.32 ▲0.181.70 ▼0.6543.40 ▲1.29
Dashboard /wp-admin2,195 ▲175.55 ▼0.0387.52 ▼25.2041.63 ▼0.61
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0535.47 ▼3.7533.80 ▼1.42
Add New Post /wp-admin/post-new.php1,526 ▼223.20 ▲0.11631.08 ▼66.6154.95 ▼2.94
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.03105.97 ▼7.2843.50 ▼3.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4, #5, #6, #7 in add-to-cart-button-customizer/assets to your readme.txt
The official readme.txt is a good inspiration

add-to-cart-button-customizer/class-custom-add-to-cart-button-for-woocommerce.php 85% from 13 tests

The principal PHP file in "Add To Cart Button Customizer" v. 2.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("/languages.")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("add-to-cart-button-customizer.php" instead of "class-custom-add-to-cart-button-for-woocommerce.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
Success! There were no dangerous files found in this plugin3,738 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP46141901,385
CSS214811,063
PO File5376445863
JavaScript217153422
XML1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity94.33
▷ Minimum class complexity6.00
▷ Maximum class complexity148.00
Average method complexity11.37
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods13.70%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
27 PNG files occupy 1.57MB with 1.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot/Customize-Your-Add-to-Cart-Button-with-Icon-and-Styling-Options.png12.00KB0.00KB▼ 100.00%
assets/128.png3.50KB1.67KB▼ 52.25%
(invalid) screenshot/Show-Custom-Add-to-Cart-Button-on-Shop-Page.png160.72KB0.00KB▼ 100.00%
(invalid) screenshot/Customize-Button-Appearance.png5.07KB0.00KB▼ 100.00%
assets/banner-1544x500.png40.96KB19.96KB▼ 51.28%