83% customize-checkout-and-buttons-for-woocommerce

Code Review | Customize Checkout and Buttons for WooCommerce

WordPress plugin Customize Checkout and Buttons for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: customize-checkou...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0.3
  • WordPress version: 6.3.1
  • First release: Nov 15, 2022
  • Latest release: Nov 15, 2022
  • Number of updates: 2
  • Update frequency: every 7.0 days
  • Top authors: gradientthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /198 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by Customize Checkout and Buttons for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.34 ▲2.93
Dashboard /wp-admin3.34 ▲0.0450.57 ▼0.62
Posts /wp-admin/edit.php3.39 ▲0.0451.10 ▼5.51
Add New Post /wp-admin/post-new.php5.92 ▲0.0497.06 ▲2.90
Media Library /wp-admin/upload.php3.27 ▲0.0438.81 ▲0.83

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Customize Checkout and Buttons for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.31 ▼0.041.64 ▲0.0540.70 ▼2.42
Dashboard /wp-admin2,205 ▲255.54 ▲0.0288.16 ▼7.4738.81 ▼5.08
Posts /wp-admin/edit.php2,116 ▲161.99 ▲0.0039.57 ▲0.2935.90 ▼1.96
Add New Post /wp-admin/post-new.php1,539 ▲1223.38 ▲0.15605.61 ▼39.7058.72 ▲0.46
Media Library /wp-admin/upload.php1,410 ▲104.18 ▼0.0398.66 ▼8.9143.09 ▼4.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/customize-checkout-and-buttons-for-woocommerce/customize-woocommerce-checkout.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/customize-checkout-and-buttons-for-woocommerce/functions.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Customize checkout fields), #2 (Customize free and virtual products fields), #3 (Customize button text), #4 (Customized Shop Page), #5 (Customized My Account Page)
The official readme.txt might help

customize-checkout-and-buttons-for-woocommerce/customize-woocommerce-checkout.php 69% from 13 tests

The principal PHP file in "Customize Checkout and Buttons for WooCommerce" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.5" instead of "5.4")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("customize-checkout-and-buttons-for-woocommerce.php" instead of "customize-woocommerce-checkout.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.6" instead of "4.8")
  • Description: Keep the plugin description shorter than 140 characters (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin666 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP312498601
CSS113065

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity56.00
▷ Minimum class complexity56.00
▷ Maximum class complexity56.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin