83% krokedil-paysoncheckout-20-for-woocommerce

Code Review | PaysonCheckout for WooCommerce

WordPress plugin PaysonCheckout for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: krokedil-paysonch...
  • Plugin version: 3.6.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 30, 2016
  • Latest release: Aug 29, 2023
  • Number of updates: 124
  • Update frequency: every 20.7 days
  • Top authors: krokedil (96.77%)michaelbengtsson (4.03%)

Code review

54 tests

User reviews

4 reviews

Install metrics

3,000+ active / 93,882 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by PaysonCheckout for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0138.35 ▼0.78
Dashboard /wp-admin3.31 ▲0.0142.56 ▼4.14
Posts /wp-admin/edit.php3.36 ▲0.0044.64 ▼0.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.71 ▼4.65
Media Library /wp-admin/upload.php3.23 ▲0.0035.47 ▲2.78

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PaysonCheckout for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.44 ▲0.161.72 ▼0.0840.42 ▼8.19
Dashboard /wp-admin2,203 ▲155.83 ▲0.92101.83 ▼14.3438.33 ▼11.08
Posts /wp-admin/edit.php2,092 ▲32.03 ▼0.0239.92 ▲2.7835.93 ▲0.70
Add New Post /wp-admin/post-new.php1,544 ▲2518.59 ▼4.59625.64 ▲7.1763.71 ▲15.36
Media Library /wp-admin/upload.php1,391 ▲94.23 ▲0.0298.39 ▲3.9141.65 ▼3.70

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/krokedil-paysoncheckout-20-for-woocommerce/templates/paysoncheckout-pay.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_print_notices() in wp-content/plugins/krokedil-paysoncheckout-20-for-woocommerce/templates/paysoncheckout-checkout.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/krokedil-paysoncheckout-20-for-woocommerce/includes/paysoncheckout-for-woocommerce-form-fields.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/krokedil-paysoncheckout-20-for-woocommerce/classes/class-paysoncheckout-for-woocommerce-templates.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: payson, e-commerce, paysoncheckout20, ecommerce, woocommerce

krokedil-paysoncheckout-20-for-woocommerce/paysoncheckout-for-woocommerce.php 77% from 13 tests

"PaysonCheckout for WooCommerce" version 3.6.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("krokedil-paysoncheckout-20-for-woocommerce.php" instead of "paysoncheckout-for-woocommerce.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.5" instead of "4.0")

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 plugin2,983 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP363901,2662,459
JavaScript15393351
PO File13942129
CSS16344

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.48
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes31
▷ Abstract classes00.00%
▷ Concrete classes31100.00%
▷ Final classes00.00%
Methods120
▷ Static methods1714.17%
▷ Public methods11797.50%
▷ Protected methods21.67%
▷ Private methods10.83%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG files were detected