83% woocommerce-change-button-text

Code Review | WooCommerce Change Button Text

WordPress plugin WooCommerce Change Button Text scored 83% from 54 tests.

About plugin

  • Plugin page: woocommerce-chang...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-3.0
  • WordPress version: 6.3.1
  • First release: Sep 7, 2013
  • Latest release: Sep 7, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: mbejda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 370 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.15ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Change Button Text
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.85 ▼4.67
Dashboard /wp-admin3.31 ▲0.0148.91 ▼1.67
Posts /wp-admin/edit.php3.36 ▲0.0043.93 ▼2.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.47 ▼7.63
Media Library /wp-admin/upload.php3.23 ▲0.0039.90 ▲8.35

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Change Button Text
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.37 ▼0.871.83 ▲0.1042.29 ▼2.14
Dashboard /wp-admin2,206 ▲324.86 ▼1.00101.91 ▼5.6436.18 ▼8.28
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0037.27 ▲1.2434.71 ▲0.77
Add New Post /wp-admin/post-new.php1,542 ▲822.90 ▼0.16601.95 ▼27.1763.21 ▲8.51
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0296.64 ▼4.5645.11 ▼1.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woocommerce-change-button-text/index.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woocommerce-change-button-text/views/tabs.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-change-button-text/main.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Stable tag: Empty value
The official readme.txt is a good inspiration

woocommerce-change-button-text/index.php 85% from 13 tests

The entry point to "WooCommerce Change Button Text" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-change-button-text.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 242 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected96 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP329896

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin