74% bankval

Code Review | BankVal - Bank Sort Code & Account Number Validation

WordPress plugin BankVal - Bank Sort Code & Account Number Validation scored74%from 54 tests.

About plugin

  • Plugin page: bankval
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 11, 2021
  • Latest release: Jul 8, 2021
  • Number of updates: 17
  • Update frequency: every 2.1 days
  • Top authors: rferesteanu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /444 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.61ms] Passed 4 tests

Server-side resources used by BankVal - Bank Sort Code & Account Number Validation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1238.22 ▼2.58
Dashboard /wp-admin3.43 ▲0.1346.45 ▼0.21
Posts /wp-admin/edit.php3.54 ▲0.1949.41 ▼0.09
Add New Post /wp-admin/post-new.php6.01 ▲0.1391.76 ▲0.52
Media Library /wp-admin/upload.php3.35 ▲0.1335.05 ▲0.44
General /wp-admin/admin.php?page=unified_software3.3235.19
BankVal /wp-admin/admin.php?page=unified_software_bankval3.3234.46

Server storage [IO: ▲0.04MB] [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: 12 new files
Database: 1 new table, 8 new options
New tables
bankval
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
unified_software_bankval
widget_recent-posts
widget_theysaidso_widget
unified_software_encryption_key
widget_recent-comments

Browser metrics Passed 4 tests

BankVal - Bank Sort Code & Account Number Validation: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲14213.56 ▼0.868.40 ▲6.6141.94 ▲3.94
Dashboard /wp-admin2,230 ▲454.84 ▼0.04106.60 ▲0.5642.52 ▼0.83
Posts /wp-admin/edit.php2,116 ▲272.04 ▼0.0339.86 ▲0.5435.51 ▲5.10
Add New Post /wp-admin/post-new.php1,555 ▲2123.08 ▼0.09629.11 ▼30.6650.69 ▼8.81
Media Library /wp-admin/upload.php1,418 ▲304.27 ▲0.0793.64 ▼10.5340.02 ▼2.79
General /wp-admin/admin.php?page=unified_software8032.0424.7226.88
BankVal /wp-admin/admin.php?page=unified_software_bankval8072.0325.2430.04

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The uninstall procedure failed, leaving 1 table in the database
    • bankval
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function UNIFIED_SOFTWARE\\BANKVAL\\add_action() in wp-content/plugins/bankval/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function UNIFIED_SOFTWARE\\BANKVAL\\add_action() in wp-content/plugins/bankval/menu.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/bankval/template/bankval-form-template.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

bankval/bankval.php Passed 13 tests

The entry point to "BankVal - Bank Sort Code & Account Number Validation" version 0.1.0 is a PHP file that has certain tags in its header comment area
83 characters long description:
Save time and money by making sure your payments and Direct Debits work first time.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin690 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP714527607
JavaScript112054
CSS17029

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions31
▷ Named functions2993.55%
▷ Anonymous functions26.45%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.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
PNG images were not found in this plugin