10% woo-button-text

Code Review | Woo Button Text

WordPress plugin Woo Button Text scored10%from 54 tests.

About plugin

  • Plugin page: woo-button-text
  • Plugin version: 6.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7.5
  • WordPress version: 6.3.1
  • First release: Jan 5, 2015
  • Latest release: Apr 27, 2017
  • Number of updates: 68
  • Update frequency: every 12.4 days
  • Top authors: rupomkhondaker (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /38,118 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/woo-button-text/woo-button-option.php+285
    Function create_function() is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼50.60ms] Passed 4 tests

This is a short check of server-side resources used by Woo Button Text
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.25 ▼38.81
Dashboard /wp-admin2.12 ▼1.185.52 ▼40.81
Posts /wp-admin/edit.php2.12 ▼1.235.88 ▼40.72
Add New Post /wp-admin/post-new.php2.12 ▼3.766.58 ▼82.06
Media Library /wp-admin/upload.php2.12 ▼1.116.34 ▼29.65
Exclutips Settings /wp-admin/admin.php?page=exclutips-settings2.125.90
Woo Button Text /wp-admin/admin.php?page=exclutips-woo-button-options2.126.17

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Button Text
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.75 ▼0.601.66 ▲0.0443.48 ▲3.03
Dashboard /wp-admin2,250 ▲625.04 ▲0.18114.48 ▲12.4874.51 ▲32.59
Posts /wp-admin/edit.php2,135 ▲462.31 ▲0.3241.89 ▲6.9836.55 ▲2.35
Add New Post /wp-admin/post-new.php1,705 ▲16321.37 ▲2.92761.64 ▲133.9138.70 ▼14.48
Media Library /wp-admin/upload.php1,432 ▲444.45 ▲0.18100.50 ▼0.2278.92 ▲31.71
Exclutips Settings /wp-admin/admin.php?page=exclutips-settings8713.1070.1227.06
Woo Button Text /wp-admin/admin.php?page=exclutips-woo-button-options8781.8827.4830.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/woo-button-text/woo-button-option.php+285
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=exclutips-woo-button-options
    • > Deprecated in wp-content/plugins/woo-button-text/woo-button-option.php+285
    Function create_function() is deprecated
  • 2986 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=exclutips-woo-button-options
    • > Notice in wp-content/plugins/woo-button-text/inc/add-filters.php+59
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=exclutips-woo-button-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=exclutips-woo-button-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=exclutips-woo-button-options
    • > Notice in wp-content/plugins/woo-button-text/woo-button-option.php+169
    Undefined index: exclutips_archive_add_to_cart
    • > GET request to /wp-admin/admin.php?page=exclutips-woo-button-options
    • > Notice in wp-content/plugins/woo-button-text/woo-button-option.php+175
    Undefined index: exclutips_single_add_to_cart
    • > GET request to /wp-admin/admin.php?page=exclutips-woo-button-options
    • > Notice in wp-content/plugins/woo-button-text/woo-button-option.php+181
    Undefined index: exclutips_old_add_to_cart
    • > GET request to /wp-admin/admin.php?page=exclutips-woo-button-options
    • > Notice in wp-content/plugins/woo-button-text/woo-button-option.php+187
    Undefined index: exclutips_place_order

SRP 0% 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
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woo-button-text/woo-button-text.php
    • > /wp-content/plugins/woo-button-text/styles/woobuttonstyle.php
    • > /wp-content/plugins/woo-button-text/inc/add-filters.php
    • > /wp-content/plugins/woo-button-text/inc/dashboard.php
    • > /wp-content/plugins/woo-button-text/woo-button-option.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/woo-button-text/exclutips-option.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

woo-button-text/woo-button-text.php Passed 13 tests

The primary PHP file in "Woo Button Text" version 6.0.3 is used by WordPress to initiate all plugin functionality
57 characters long description:
WooCommerce Button text changer with Button Color styler.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin357 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP765118354
JavaScript1003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.18
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.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
6 PNG files occupy 0.41MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png44.72KB19.78KB▼ 55.76%
Screenshot-1.png43.64KB19.66KB▼ 54.95%
Screenshot-4.png27.76KB12.80KB▼ 53.90%
Screenshot-2.png303.70KB73.69KB▼ 75.74%
images/icon-location.png1.54KB0.74KB▼ 51.87%