78% woo-vipps

Code Review | Pay with Vipps for WooCommerce

WordPress plugin Pay with Vipps for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: woo-vipps
  • Plugin version: 1.14.16
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 26, 2018
  • Latest release: Nov 27, 2023
  • Number of updates: 192
  • Update frequency: every 10.3 days
  • Top authors: wphostingdev (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

4,000+ active /217,189 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.78ms] Passed 4 tests

Server-side resources used by Pay with Vipps for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.69 ▲0.42
Dashboard /wp-admin3.32 ▲0.0246.19 ▼4.94
Posts /wp-admin/edit.php3.37 ▲0.0144.44 ▼4.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.99 ▼18.54
Media Library /wp-admin/upload.php3.24 ▲0.0136.97 ▲1.20

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 72 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Pay with Vipps for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2814.34 ▼0.381.98 ▲0.2540.67 ▲2.24
Dashboard /wp-admin2,198 ▲235.59 ▼0.1294.77 ▼18.0742.58 ▲0.82
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0039.84 ▲0.8735.29 ▼0.86
Add New Post /wp-admin/post-new.php1,526 ▼023.45 ▲0.57665.42 ▼89.9947.32 ▼15.63
Media Library /wp-admin/upload.php1,403 ▲34.21 ▼0.0797.91 ▼2.6842.22 ▲0.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-vipps/lib/countrycodes.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-vipps/VippsCheckoutShippingMethods.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-vipps/Blocks/Badges/vipps-badge.php:114
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Session_Handler' not found in wp-content/plugins/woo-vipps/VippsCallbackSessionHandler.class.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/woo-vipps/Blocks/Payment/Vipps.class.php:11

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Screenshots: Add an image for screenshot #4 (Create shareable links and QR codes)
The official readme.txt might help

woo-vipps/woo-vipps.php Passed 13 tests

The main file in "Pay with Vipps for WooCommerce" v. 1.14.16 serves as a complement to information provided in readme.txt and as the entry point to the plugin
47 characters long description:
Offer Vipps as a payment method for WooCommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin11,950 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP161,6521,4558,821
PO File16036411,229
JavaScript102261831,221
CSS46037512
SVG702120
Markdown219047

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity85.39
▷ Minimum class complexity1.00
▷ Maximum class complexity587.00
Average method complexity5.44
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes15.56%
Methods333
▷ Static methods257.51%
▷ Public methods31093.09%
▷ Protected methods72.10%
▷ Private methods164.80%
Functions61
▷ Named functions46.56%
▷ Anonymous functions5793.44%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.64MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logginn.png11.99KB4.63KB▼ 61.39%
api-key-guide.png452.00KB129.83KB▼ 71.28%
img/vipps-smile-orange.png3.96KB1.91KB▼ 51.65%
img/vipps_logo_rgb.png50.53KB18.50KB▼ 63.39%
docs/images/mp.png0.42KB0.25KB▼ 38.88%