84% easy-options-add-to-cart-button-text-per-product-wc

Code Review | Easy Options Add-To-Cart Button Text per product for WooCommerce

WordPress plugin Easy Options Add-To-Cart Button Text per product for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: easy-options-add-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.9.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2020
  • Latest release: May 19, 2022
  • Number of updates: 6
  • Update frequency: every 92.5 days
  • Top authors: jsherk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 863 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.24ms] Passed 4 tests

A check of server-side resources used by Easy Options Add-To-Cart Button Text per product for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.84 ▼5.34
Dashboard /wp-admin3.33 ▲0.0347.54 ▼0.52
Posts /wp-admin/edit.php3.38 ▲0.0351.34 ▲5.23
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.19 ▼11.07
Media Library /wp-admin/upload.php3.26 ▲0.0335.62 ▼0.04
Easy Options Add To Cart button text per product WC /wp-admin/options-general.php?page=easy-options-add-to-cart-button-text-per-product-wc3.2245.36

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Options Add-To-Cart Button Text per product for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.56 ▼0.821.65 ▼0.3143.58 ▼4.36
Dashboard /wp-admin2,210 ▲195.90 ▲1.00104.47 ▲4.0137.52 ▼8.94
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0534.45 ▼1.4931.81 ▼0.90
Add New Post /wp-admin/post-new.php1,517 ▼1817.82 ▼5.53619.19 ▼40.5564.38 ▲1.33
Media Library /wp-admin/upload.php1,392 ▲44.26 ▲0.0694.80 ▼1.3042.34 ▲1.33
Easy Options Add To Cart button text per product WC /wp-admin/options-general.php?page=easy-options-add-to-cart-button-text-per-product-wc7772.0231.5052.55

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-options-add-to-cart-button-text-per-product-wc/easy-options-add-to-cart-button-text-per-product-wc.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: text, buy now button, woocommerce, button, add to cart...

easy-options-add-to-cart-button-text-per-product-wc/easy-options-add-to-cart-button-text-per-product-wc.php Passed 13 tests

The main PHP file in "Easy Options Add-To-Cart Button Text per product for WooCommerce" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
131 characters long description:
Allows you to change the text on a WooCommerce products Add To Cart button to BUY NOW. This can be selected on a per product basis.

Code Analysis Passed 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 detected129 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13932129

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dbut-small.png5.33KB2.67KB▼ 49.92%
stars-small.png1.50KB1.51KB0.00%
dbut.png13.46KB6.06KB▼ 55.01%