83% woo-webdebit-payment-gateway

Code Review | WebDebit Pay By Check Gateway

WordPress plugin WebDebit Pay By Check Gateway scored 83% from 54 tests.

About plugin

  • Plugin page: woo-webdebit-paym...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3
  • WordPress version: 6.3.1
  • First release: Jan 31, 2020
  • Latest release: Mar 2, 2020
  • Number of updates: 14
  • Update frequency: every 2.2 days
  • Top authors: instantpc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 428 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by WebDebit Pay By Check Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.57 ▼3.13
Dashboard /wp-admin3.31 ▲0.0045.65 ▼4.97
Posts /wp-admin/edit.php3.36 ▲0.0047.13 ▼0.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.15 ▲0.15
Media Library /wp-admin/upload.php3.23 ▲0.0032.95 ▲0.98

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WebDebit Pay By Check Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.63 ▼0.931.83 ▲0.0640.16 ▼10.06
Dashboard /wp-admin2,209 ▲244.85 ▼0.96107.72 ▲8.8644.35 ▲1.39
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0239.11 ▲1.8034.65 ▼0.36
Add New Post /wp-admin/post-new.php1,534 ▼823.28 ▲4.94665.18 ▲49.6349.99 ▲4.53
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0092.02 ▼13.1640.41 ▼3.82

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-webdebit-payment-gateway/webdebit-pay-by-check-gateway.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-webdebit-payment-gateway/class-woocommerce-webdebit-payment-gateway.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/woo-webdebit-payment-gateway/webdebit-thanks.php:12

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: echeck, woocommerce extension, payment, checks, payment option...

woo-webdebit-payment-gateway/webdebit-pay-by-check-gateway.php 77% from 13 tests

Analyzing the main PHP file in "WebDebit Pay By Check Gateway" version 1.0.5
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-webdebit-payment-gateway.php" instead of "webdebit-pay-by-check-gateway.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected423 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP36277386
PO File191137

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon-256x256.png44.68KB20.35KB▼ 54.46%