84% estonian-banklinks-for-woocommerce

Code Review | Estonian Banklinks for WooCommerce

WordPress plugin Estonian Banklinks for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: estonian-banklink...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.2.4
  • WordPress version: 6.3.1
  • First release: Oct 3, 2015
  • Latest release: Nov 2, 2019
  • Number of updates: 31
  • Update frequency: every 52.8 days
  • Top authors: RistoNiinemets (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

700+ active /6,616 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Estonian Banklinks for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.74 ▼0.48
Dashboard /wp-admin3.31 ▼0.0344.78 ▼11.41
Posts /wp-admin/edit.php3.36 ▲0.0147.78 ▲0.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.45 ▼6.16
Media Library /wp-admin/upload.php3.23 ▲0.0132.89 ▼3.96

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Estonian Banklinks for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.541.79 ▲0.0139.30 ▼4.16
Dashboard /wp-admin2,206 ▲155.83 ▲0.92105.79 ▼3.5536.72 ▼5.61
Posts /wp-admin/edit.php2,092 ▲62.06 ▲0.0841.38 ▲6.4335.96 ▲0.48
Add New Post /wp-admin/post-new.php1,542 ▲918.61 ▼4.76631.96 ▼49.8257.35 ▲4.49
Media Library /wp-admin/upload.php1,391 ▲64.17 ▼0.12102.89 ▼1.7342.60 ▼3.61

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Please take a closer look at the following
  • 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Banklink_Ipizza' not found in wp-content/plugins/estonian-banklinks-for-woocommerce/includes/gateways/class-wc-banklink-lhv-gateway.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Banklink_Ipizza' not found in wp-content/plugins/estonian-banklinks-for-woocommerce/includes/gateways/class-wc-banklink-seb-gateway.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Banklink_Ipizza' not found in wp-content/plugins/estonian-banklinks-for-woocommerce/includes/gateways/class-wc-banklink-nordea-ipizza-gateway.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Banklink_Solo' not found in wp-content/plugins/estonian-banklinks-for-woocommerce/includes/gateways/class-wc-banklink-nordea-gateway.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Banklink' not found in wp-content/plugins/estonian-banklinks-for-woocommerce/includes/abstracts/class-wc-banklink-maksekeskus.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Banklink_Maksekeskus' not found in wp-content/plugins/estonian-banklinks-for-woocommerce/includes/gateways/class-wc-banklink-maksekeskus-redirect-gateway.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Banklink_Maksekeskus' not found in wp-content/plugins/estonian-banklinks-for-woocommerce/includes/gateways/class-wc-banklink-maksekeskus-billing-api.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Banklink' not found in wp-content/plugins/estonian-banklinks-for-woocommerce/includes/abstracts/class-wc-banklink-ipizza.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Banklink' not found in wp-content/plugins/estonian-banklinks-for-woocommerce/includes/gateways/class-wc-banklink-estcard-gateway.php:2
    • > PHP Notice
      Undefined variable: methods in wp-content/plugins/estonian-banklinks-for-woocommerce/woocommerce/checkout/payment-method-maksekeskus.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: woocommerce, banklink, estonia, payment gateway, pangalink

estonian-banklinks-for-woocommerce/estonian-banklinks-for-woocommerce.php 85% from 13 tests

The primary PHP file in "Estonian Banklinks for WooCommerce" version 1.4 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.1" instead of "2.6")
  • 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 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,399 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP182806631,202
PO File15981164
LESS16032
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.88
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes425.00%
▷ Concrete classes1275.00%
▷ Final classes00.00%
Methods74
▷ Static methods11.35%
▷ Public methods7398.65%
▷ Protected methods00.00%
▷ Private methods11.35%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
15 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/liisi.png3.20KB1.96KB▼ 38.64%
assets/img/krediidipank.png1.08KB1.07KB0.45%
assets/screenshot-2.png29.98KB13.50KB▼ 54.96%
assets/img/swedbank.png1.07KB1.08KB0.00%
assets/img/maksekeskus_redirect.png0.38KB0.40KB0.00%