83% wc-add-to-cart-button-labels-links

Code Review | Add to Cart Button Labels & Links for WooCommerce

WordPress plugin Add to Cart Button Labels & Links for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-add-to-cart-bu...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.10-5.6
  • WordPress version: 6.3.1
  • First release: Dec 19, 2020
  • Latest release: Apr 30, 2021
  • Number of updates: 12
  • Update frequency: every 11.0 days
  • Top authors: gandhihitesh9 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /497 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Add to Cart Button Labels & Links for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.80 ▼1.94
Dashboard /wp-admin3.31 ▼0.0446.77 ▼22.57
Posts /wp-admin/edit.php3.36 ▲0.0048.90 ▲2.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.38 ▼18.61
Media Library /wp-admin/upload.php3.23 ▲0.0036.17 ▲2.08
Out of stock labels /wp-admin/admin.php?page=atc-bll-wc-oos-labels3.0023.11
Add to cart button labels & links /wp-admin/admin.php?page=atc-bll-wc-settings3.0025.34

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Add to Cart Button Labels & Links for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.80 ▲0.421.88 ▼0.2145.89 ▲3.70
Dashboard /wp-admin2,221 ▲155.90 ▲0.05108.09 ▲2.8040.66 ▼1.27
Posts /wp-admin/edit.php2,100 ▼02.05 ▼0.0039.66 ▲2.0535.29 ▼0.87
Add New Post /wp-admin/post-new.php1,526 ▼017.63 ▲0.04653.89 ▼33.5753.61 ▼1.29
Media Library /wp-admin/upload.php1,391 ▼94.23 ▲0.01100.17 ▼47.5240.14 ▼17.67
Out of stock labels /wp-admin/admin.php?page=atc-bll-wc-oos-labels280.440.063.86
Add to cart button labels & links /wp-admin/admin.php?page=atc-bll-wc-settings280.440.084.82

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=atc-bll-wc-oos-labels
    • > Network (severe)
    wp-admin/admin.php?page=atc-bll-wc-oos-labels - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=atc-bll-wc-settings
    • > Network (severe)
    wp-admin/admin.php?page=atc-bll-wc-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (25 tag instead of maximum 10)
You can take inspiration from this readme.txt

wc-add-to-cart-button-labels-links/add-to-cart-labels-links-wc.php 85% from 13 tests

The main PHP file in "Add to Cart Button Labels & Links for WooCommerce" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wc-add-to-cart-button-labels-links.php" instead of "add-to-cart-labels-links-wc.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected676 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8166134676

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity21.50
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected