Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.02MB] [CPU: ▼296.90ms] Passed 4 tests
A check of server-side resources used by Change WooCommerce Add To Cart Button Text
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.01 | 53.63 ▲1.33 |
Dashboard /wp-admin | 3.41 ▲0.00 | 34.26 ▲0.22 |
Posts /wp-admin/edit.php | 3.64 ▲0.00 | 37.54 ▼2.14 |
Add New Post /wp-admin/post-new.php | 6.88 ▼0.09 | 101.75 ▼1,187.02 |
Media Library /wp-admin/upload.php | 3.29 ▲0.00 | 23.98 ▲1.37 |
Server storage [IO: ▲0.65MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 52 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for Change WooCommerce Add To Cart Button Text
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,799 ▲45 | 16.25 ▲0.45 | 6.19 ▲0.54 | 2.74 ▼0.15 |
Dashboard /wp-admin | 2,895 ▲34 | 6.07 ▼0.08 | 113.04 ▼23.84 | 151.88 ▼5.96 |
Posts /wp-admin/edit.php | 2,691 ▼3 | 3.24 ▲0.01 | 63.46 ▼0.60 | 142.98 ▼0.37 |
Add New Post /wp-admin/post-new.php | 1,752 ▲91 | 21.51 ▲5.73 | 429.14 ▲8.29 | 151.10 ▼2.45 |
Media Library /wp-admin/upload.php | 1,698 ▲3 | 5.49 ▲0.02 | 143.19 ▲4.56 | 180.09 ▼6.62 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/change-woocommerce-add-to-cart-button-text/admin/partials/rex-variation-swatches-for-woocommerce-admin-display.php
- > /wp-content/plugins/change-woocommerce-add-to-cart-button-text/public/partials/rex-variation-swatches-for-woocommerce-public-display.php
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/change-woocommerce-add-to-cart-button-text/change-wc-button-text.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/change-woocommerce-add-to-cart-button-text/admin/class-rex-variation-swatches-for-woocommerce-admin-product.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/change-woocommerce-add-to-cart-button-text/admin/partials/rexvs_settings.php:17
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: change, add to cart, woocommerce, button
change-woocommerce-add-to-cart-button-text/change-wc-button-text.php 85% from 13 tests
Analyzing the main PHP file in "Change WooCommerce Add To Cart Button Text" version 1.3
Please make the necessary changes and fix the following:
- Description: Please don't use more than 140 characters for the plugin description (currently 148 characters long)
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("change-woocommerce-add-to-cart-button-text.php" instead of "change-wc-button-text.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected6,046 lines of code in 36 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 22 | 907 | 1,465 | 3,871 |
CSS | 3 | 18 | 7 | 670 |
PO File | 5 | 255 | 280 | 613 |
Sass | 1 | 79 | 5 | 585 |
JavaScript | 5 | 90 | 82 | 307 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 190)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 38.53 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 299.00 |
Average method complexity | 5.11 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 190.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 15 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 15 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 137 | |
▷ Static methods | 6 | 4.38% |
▷ Public methods | 93 | 67.88% |
▷ Protected methods | 6 | 4.38% |
▷ Private methods | 38 | 27.74% |
Functions | 19 | |
▷ Named functions | 19 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/icon.png | 1.88KB | 1.26KB | ▼ 32.88% |
images/logo.png | 4.46KB | 2.49KB | ▼ 44.20% |