93% op-payment-service-for-woocommerce

Code Review | Checkout Finland for WooCommerce

WordPress plugin Checkout Finland for WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: op-payment-servic...
  • Plugin version: 1.7.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 5.8.1
  • First release: Oct 24, 2019
  • Latest release: Dec 8, 2021
  • Number of updates: 32
  • Update frequency: every 24.3 days
  • Top authors: loueranta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 23,962 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Checkout Finland for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1224.89 ▲9.89
Dashboard /wp-admin3.06 ▼0.0032.16 ▼4.29
Posts /wp-admin/edit.php3.11 ▲0.0031.49 ▲1.91
Add New Post /wp-admin/post-new.php5.42 ▼0.0268.71 ▼703.10
Media Library /wp-admin/upload.php3.00 ▲0.0022.29 ▲0.58

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 376 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Checkout Finland for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6515.95 ▼0.038.27 ▲2.8278.28 ▲2.14
Dashboard /wp-admin2,930 ▲346.07 ▼0.05114.39 ▼20.90168.70 ▼4.84
Posts /wp-admin/edit.php2,740 ▼03.23 ▼0.0065.17 ▲0.38135.69 ▼4.40
Add New Post /wp-admin/post-new.php3,698 ▼3718.09 ▲0.06434.74 ▼30.79160.24 ▼0.89
Media Library /wp-admin/upload.php1,749 ▲35.56 ▲0.04142.93 ▼5.65201.18 ▲14.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 186× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/op-payment-service-for-woocommerce/vendor/composer/installers/src/Composer/Installers/AkauntingInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'OpMerchantServices\\SDK\\Interfaces\\ResponseInterface' not found in wp-content/plugins/op-payment-service-for-woocommerce/vendor/checkout-finland/checkout-finland-php-sdk/src/Response/RevertPaymentAuthHoldResponse.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/op-payment-service-for-woocommerce/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/op-payment-service-for-woocommerce/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/op-payment-service-for-woocommerce/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/op-payment-service-for-woocommerce/vendor/checkout-finland/checkout-finland-php-sdk/lib/guzzlehttp/psr7/src/UploadedFile.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/op-payment-service-for-woocommerce/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/op-payment-service-for-woocommerce/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/op-payment-service-for-woocommerce/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/op-payment-service-for-woocommerce/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: woocommerce

op-payment-service-for-woocommerce/plugin.php 77% from 13 tests

Analyzing the main PHP file in "Checkout Finland for WooCommerce" version 1.7.1
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("op-payment-service-for-woocommerce.php" instead of "plugin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 175 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected49,412 lines of code in 353 files:
LanguageFilesBlank linesComment linesLines of code
PHP2934,2439,98834,024
JSON141010,491
Markdown201,27403,750
PO File2128142388
Sass1321242
JavaScript41515199
YAML7550198
SVG80890
Dockerfile18010
XML10010
make1409
CSS1001

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.28
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces23
Interfaces23
Traits5
Classes233
▷ Abstract classes31.29%
▷ Concrete classes23098.71%
▷ Final classes2510.87%
Methods1,286
▷ Static methods15411.98%
▷ Public methods1,05481.96%
▷ Protected methods806.22%
▷ Private methods15211.82%
Functions207
▷ Named functions7134.30%
▷ Anonymous functions13665.70%
Constants181
▷ Global constants4122.65%
▷ Class constants14077.35%
▷ Public constants140100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin