93% woo-gateway-vipps

Code Review | Checkout Vipps for WooCommerce

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

About plugin

  • Plugin page: woo-gateway-vipps
  • Plugin version: 2.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.8
  • WordPress version: 5.8.1
  • First release: Aug 24, 2018
  • Latest release: Jan 14, 2022
  • Number of updates: 38
  • Update frequency: every 32.6 days
  • Top authors: siglar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 757 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼177.12ms] Passed 4 tests

Server-side resources used by Checkout Vipps for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.0923.54 ▲0.99
Dashboard /wp-admin3.15 ▲0.0833.73 ▼2.24
Posts /wp-admin/edit.php3.24 ▲0.1229.64 ▲0.20
Add New Post /wp-admin/post-new.php5.51 ▲0.0768.36 ▼707.44
Media Library /wp-admin/upload.php3.09 ▲0.0924.48 ▲2.90

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Checkout Vipps for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,667 ▲6615.64 ▼0.045.02 ▼1.8476.27 ▼2.54
Dashboard /wp-admin2,927 ▲316.13 ▼0.12114.83 ▼17.60169.42 ▼4.84
Posts /wp-admin/edit.php2,740 ▼03.37 ▲0.0263.12 ▼0.27137.12 ▲1.00
Add New Post /wp-admin/post-new.php3,807 ▲5617.97 ▼0.54455.11 ▲5.54159.13 ▼1.23
Media Library /wp-admin/upload.php1,752 ▼05.48 ▼0.01143.41 ▼6.95186.74 ▲2.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woo-gateway-vipps/includes/unzip.php:4

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 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Requires php: Version not formatted correctly
  • Screenshots: These screenshots need descriptions #1, #2 in woo-gateway-vipps/assets to your readme.txt
You can look at the official readme.txt

woo-gateway-vipps/woo-gateway-vipps.php 92% from 13 tests

The entry point to "Checkout Vipps for WooCommerce" version 2.1.7 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,450 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP133342641,442
JavaScript30147
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity53.50
▷ Minimum class complexity33.00
▷ Maximum class complexity74.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods3597.22%
▷ Protected methods00.00%
▷ Private methods12.78%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/vipps.png2.16KB1.13KB▼ 47.76%