77% checkout-manager-for-woocommerce

Code Review | Checkout Manager For Woocommerce

WordPress plugin Checkout Manager For Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: checkout-manager-...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-5.3
  • WordPress version: 6.3.1
  • First release: May 25, 2016
  • Latest release: Feb 3, 2020
  • Number of updates: 92
  • Update frequency: every 14.7 days
  • Top authors: phoeniixx (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /21,610 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.88ms] Passed 4 tests

An overview of server-side resources used by Checkout Manager For Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1133.15 ▼5.79
Dashboard /wp-admin3.42 ▲0.1244.63 ▼3.58
Posts /wp-admin/edit.php3.47 ▲0.1147.51 ▲0.36
Add New Post /wp-admin/post-new.php6.00 ▲0.1184.27 ▼14.49
Media Library /wp-admin/upload.php3.35 ▲0.1134.89 ▲1.77

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Checkout Manager For Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.31 ▼1.061.66 ▲0.0237.36 ▼6.39
Dashboard /wp-admin2,215 ▲304.86 ▼0.0599.59 ▼6.9039.52 ▼6.43
Posts /wp-admin/edit.php2,097 ▲81.99 ▼0.0441.61 ▲3.1237.30 ▲5.34
Add New Post /wp-admin/post-new.php1,548 ▲3418.32 ▲0.67587.84 ▼109.0760.56 ▲0.52
Media Library /wp-admin/upload.php1,394 ▲64.25 ▲0.0295.47 ▼24.1541.67 ▼6.38

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 were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_billing.php
    • > /wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_additional.php
    • > /wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_shipping.php
  • 39× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_shipping.php on line 40
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_shipping.php on line 60
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_billing.php on line 66
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_additional.php on line 13
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_billing.php on line 1
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_billing.php on line 13
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_billing.php on line 49
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_additional.php on line 66
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_shipping.php on line 19
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/checkout-manager-for-woocommerce/templates/admin/add_field_form_additional.php on line 49

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)
There were no browser issues found

Optimizations

Plugin configuration 80% 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:
  • Tags: There are too many tags (30 tag instead of maximum 10)
Please take inspiration from this readme.txt

checkout-manager-for-woocommerce/plugin.php 62% from 13 tests

The entry point to "Checkout Manager For Woocommerce" version 1.3.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "2.6.0")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 150 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("checkout-manager-for-woocommerce.php" instead of "plugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,593 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP121,068661,593

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 108)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity113.00
▷ Minimum class complexity113.00
▷ Maximum class complexity113.00
Average method complexity23.40
▷ Minimum method complexity1.00
▷ Maximum method complexity108.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/checkout-mamnger-first-img.png34.93KB9.09KB▼ 73.97%
assets/img/image-frame-even.png0.67KB0.62KB▼ 8.42%
assets/img/checkout-mamnger-thrd-img.png21.83KB5.92KB▼ 72.88%
assets/img/premium-head.png6.61KB5.20KB▼ 21.37%
assets/img/checkout-mamnger-scnd-img.png20.56KB5.89KB▼ 71.34%