88% iw-woocomerce-cart-item-redirect

Code Review | IW Woocomerce Cart Item Redirect

WordPress plugin IW Woocomerce Cart Item Redirect scored 88% from 54 tests.

About plugin

  • Plugin page: iw-woocomerce-car...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.4
  • WordPress version: 5.8.1
  • First release: Apr 27, 2016
  • Latest release: Apr 27, 2016
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: IT Wonders (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,506 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼139.58ms] Passed 4 tests

A check of server-side resources used by IW Woocomerce Cart Item Redirect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1435.93 ▲13.86
Dashboard /wp-admin3.08 ▲0.0350.98 ▲11.82
Posts /wp-admin/edit.php3.13 ▲0.0242.05 ▼2.62
Add New Post /wp-admin/post-new.php5.44 ▲0.0089.32 ▼569.25
Media Library /wp-admin/upload.php3.02 ▲0.0231.55 ▲1.75

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for IW Woocomerce Cart Item Redirect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.33 ▲0.877.98 ▼2.0849.01 ▲4.05
Dashboard /wp-admin2,970 ▲395.91 ▼0.04130.28 ▼10.55110.85 ▲1.31
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0164.73 ▲1.6694.07 ▲3.13
Add New Post /wp-admin/post-new.php1,672 ▼1118.78 ▲0.00358.55 ▼28.14112.49 ▲1.87
Media Library /wp-admin/upload.php1,810 ▲34.99 ▼0.06146.84 ▲2.44118.88 ▼4.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/iw-woocomerce-cart-item-redirect/iw-index.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function IW\\WooCommerce\\add_filter() in wp-content/plugins/iw-woocomerce-cart-item-redirect/iw-autoload.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === iw-woocomerce-cart-item-redirect === )
Please take inspiration from this readme.txt

iw-woocomerce-cart-item-redirect/iw-index.php 92% from 13 tests

The primary PHP file in "IW Woocomerce Cart Item Redirect" version 0.1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("iw-woocomerce-cart-item-redirect.php" instead of "iw-index.php")

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 detected89 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2212589

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity2.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods266.67%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin