83% woo-payid-gateway

Code Review | WooCommerce PayID Payment Gateway

WordPress plugin WooCommerce PayID Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: woo-payid-gateway
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-4.9
  • WordPress version: 6.3.1
  • First release: Aug 28, 2018
  • Latest release: Aug 28, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: biostim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,044 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
Installer ran successfully

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

A check of server-side resources used by WooCommerce PayID Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.73 ▼0.06
Dashboard /wp-admin3.31 ▲0.0047.28 ▼8.53
Posts /wp-admin/edit.php3.36 ▲0.0049.84 ▼2.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.72 ▼1.76
Media Library /wp-admin/upload.php3.23 ▲0.0037.31 ▲0.41

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce PayID Payment Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.101.52 ▼0.2942.48 ▼1.20
Dashboard /wp-admin2,192 ▲155.54 ▼0.1091.78 ▲8.3039.83 ▼3.95
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0140.02 ▼2.0535.81 ▲0.42
Add New Post /wp-admin/post-new.php1,528 ▼023.12 ▲0.15637.74 ▼34.2859.64 ▲10.92
Media Library /wp-admin/upload.php1,397 ▼04.15 ▼0.1298.15 ▼35.3548.66 ▼9.21

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-payid-gateway/woocommerce-payid-gateway.php:49
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-payid-gateway/class-woocommerce-payid-payment-gateway.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Checkout Page Preview.), #2 (PayID Settings Page.), #3 (Order Notes.)
The official readme.txt is a good inspiration

woo-payid-gateway/woocommerce-payid-gateway.php 77% from 13 tests

The main file in "WooCommerce PayID Payment Gateway" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-payid-gateway.php" instead of "woocommerce-payid-gateway.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("3.5.1" instead of "2.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin125 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21728125

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin