89% wc-gocardless-instant-bank-payments

Code Review | Instant Bank Payments via GoCardless for WooCommerce

WordPress plugin Instant Bank Payments via GoCardless for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wc-gocardless-ins...
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Jul 26, 2022
  • Latest release: Oct 22, 2023
  • Number of updates: 22
  • Update frequency: every 21.0 days
  • Top authors: kadament (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,394 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼11.15ms] Passed 4 tests

Analyzing server-side resources used by Instant Bank Payments via GoCardless for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0425.69 ▼16.58
Dashboard /wp-admin3.35 ▼0.0045.50 ▼14.08
Posts /wp-admin/edit.php3.40 ▲0.0443.36 ▼3.16
Add New Post /wp-admin/post-new.php5.93 ▲0.0477.82 ▼10.79
Media Library /wp-admin/upload.php3.27 ▲0.0435.80 ▲3.20

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Instant Bank Payments via GoCardless for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,454 ▼29214.10 ▼0.350.51 ▼1.1818.61 ▼25.12
Dashboard /wp-admin2,192 ▲125.62 ▼0.0596.00 ▲11.5842.14 ▲7.40
Posts /wp-admin/edit.php2,079 ▼212.03 ▲0.0434.61 ▼1.8231.09 ▼1.23
Add New Post /wp-admin/post-new.php1,526 ▼823.82 ▲1.21649.01 ▲72.4972.74 ▲4.04
Media Library /wp-admin/upload.php1,397 ▼34.24 ▼0.0994.55 ▲0.7842.76 ▲0.74

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt might help

wc-gocardless-instant-bank-payments/wc-gocardless-instant-bank-payments.php 92% from 13 tests

"Instant Bank Payments via GoCardless for WooCommerce" version 1.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 192 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin910 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5255179684
JavaScript19785226

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity13.20
▷ Minimum class complexity5.00
▷ Maximum class complexity21.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods29
▷ Static methods413.79%
▷ Public methods2586.21%
▷ Protected methods00.00%
▷ Private methods413.79%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.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
There are no PNG files in this plugin