78% belo-add-to-cart-redirect-for-woocommerce

Code Review | BELO Add to Cart Redirect for Woocommerce

WordPress plugin BELO Add to Cart Redirect for Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: belo-add-to-cart-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 25, 2022
  • Latest release: Jul 27, 2023
  • Number of updates: 15
  • Update frequency: every 16.3 days
  • Top authors: cylas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /696 total downloads


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.47ms] Passed 4 tests

A check of server-side resources used by BELO Add to Cart Redirect for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.97 ▲0.83
Dashboard /wp-admin3.31 ▲0.0147.14 ▼3.90
Posts /wp-admin/edit.php3.36 ▲0.0145.84 ▼1.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.10 ▼12.97
Media Library /wp-admin/upload.php3.23 ▲0.0139.04 ▲7.31

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

BELO Add to Cart Redirect for Woocommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.311.59 ▼0.1044.04 ▲2.15
Dashboard /wp-admin2,206 ▲184.84 ▼0.09111.53 ▼19.1838.56 ▼19.06
Posts /wp-admin/edit.php2,086 ▼32.00 ▲0.0134.06 ▼7.3832.77 ▼2.78
Add New Post /wp-admin/post-new.php1,528 ▼1423.15 ▲5.01696.43 ▲48.0355.88 ▲4.47
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.02109.24 ▲6.6245.47 ▲1.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/belo-add-to-cart-redirect-for-woocommerce/public/partials/acrw-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/belo-add-to-cart-redirect-for-woocommerce/admin/partials/acrw-admin-display.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Invalid version format
Please take inspiration from this readme.txt

belo-add-to-cart-redirect-for-woocommerce/acrw.php 85% from 13 tests

This is the main PHP file of "BELO Add to Cart Redirect for Woocommerce" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("belo-add-to-cart-redirect-for-woocommerce.php" instead of "acrw.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin5,320 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PO File282038

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.44
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
▷ Static methods924.32%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/search-icon-png-3.png0.45KB0.44KB▼ 1.09%
admin/assets/search-icon.png1.30KB1.28KB▼ 1.50%