78% add-to-cart-button-custom-text-and-color

Code Review | Add to Cart Button Custom Text and Color

WordPress plugin Add to Cart Button Custom Text and Color scored78%from 54 tests.

About plugin

  • Plugin page: add-to-cart-butto...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 17, 2016
  • Latest release: Jun 20, 2016
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: Chahat Sharma (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /5,235 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
Installer ran successfully

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

This is a short check of server-side resources used by Add to Cart Button Custom Text and Color
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0522.89 ▼20.09
Dashboard /wp-admin3.34 ▲0.0344.81 ▼2.73
Posts /wp-admin/edit.php3.39 ▲0.0346.28 ▲0.38
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.84 ▲5.69
Media Library /wp-admin/upload.php3.26 ▲0.0337.86 ▲5.41
WooCommerce Buttons /wp-admin/admin.php?page=woocommerce_buttons3.2026.78

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Add to Cart Button Custom Text and Color
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲5113.75 ▼0.874.16 ▲2.1843.85 ▼2.62
Dashboard /wp-admin2,228 ▲406.05 ▲1.20103.74 ▼14.7943.13 ▼2.73
Posts /wp-admin/edit.php2,110 ▲242.30 ▲0.3142.10 ▲5.4434.11 ▲0.52
Add New Post /wp-admin/post-new.php1,537 ▲1818.29 ▼4.98588.24 ▼84.9034.67 ▼17.71
Media Library /wp-admin/upload.php1,407 ▲164.44 ▲0.17103.76 ▲3.4641.46 ▼3.70
WooCommerce Buttons /wp-admin/admin.php?page=woocommerce_buttons1,1652.2346.4128.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=woocommerce_buttons
    • > Notice in wp-content/plugins/add-to-cart-button-custom-text-and-color/add-to-cart-button-custom-text-and-color.php+141
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/add-to-cart-button-custom-text-and-color/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-to-cart-button-custom-text-and-color/add-to-cart-button-custom-text-and-color.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #1 (The Admin screen for the plugin. screenshot-1.png) image not found
Please take inspiration from this readme.txt

add-to-cart-button-custom-text-and-color/add-to-cart-button-custom-text-and-color.php 92% from 13 tests

The main PHP file in "Add to Cart Button Custom Text and Color" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 194 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected200 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24129187
CSS11113

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin