89% woo-country-based-bank-accounts

Code Review | WooCommerce Country Based Bank Accounts

WordPress plugin WooCommerce Country Based Bank Accounts scored89%from 54 tests.

About plugin

  • Plugin page: woo-country-based...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.4
  • WordPress version: 6.3.1
  • First release: Aug 19, 2017
  • Latest release: Nov 5, 2023
  • Number of updates: 11
  • Update frequency: every 206.4 days
  • Top authors: mariankadanka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,049 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.01MB] [CPU: ▼8.29ms] Passed 4 tests

A check of server-side resources used by WooCommerce Country Based Bank Accounts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.31 ▼1.05
Dashboard /wp-admin3.33 ▼0.0145.83 ▼16.76
Posts /wp-admin/edit.php3.38 ▲0.0247.06 ▼0.86
Add New Post /wp-admin/post-new.php5.91 ▲0.0379.23 ▼14.47
Media Library /wp-admin/upload.php3.25 ▲0.0237.58 ▲4.23

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Country Based Bank Accounts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.13 ▼0.141.79 ▲0.1744.23 ▲1.34
Dashboard /wp-admin2,198 ▲265.60 ▲0.0192.81 ▼4.2740.05 ▲4.15
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0039.94 ▲3.9035.71 ▼1.39
Add New Post /wp-admin/post-new.php1,526 ▼923.73 ▲0.59657.85 ▼33.6151.64 ▼4.11
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.0397.95 ▼13.6243.69 ▼2.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (WooCommerce Country Based Bank Accounts settings page) image not found
You can take inspiration from this readme.txt

woo-country-based-bank-accounts/woo-country-based-bank-accounts.php 85% from 13 tests

"WooCommerce Country Based Bank Accounts" version 2.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.2" instead of "3.4")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin165 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35678143
Markdown116022

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.50
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png43.01KB15.75KB▼ 63.38%