10% login-with-vipps

Code Review | Login with Vipps

WordPress plugin Login with Vipps scored10%from 54 tests.

About plugin

  • Plugin page: login-with-vipps
  • Plugin version: 1.2.7
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 20, 2019
  • Latest release: Nov 28, 2023
  • Number of updates: 56
  • Update frequency: every 26.3 days
  • Top authors: wphostingdev (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active /17,545 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/login-with-vipps/VippsLogin.class.php+440
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.95ms] Passed 4 tests

An overview of server-side resources used by Login with Vipps
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.26 ▼3.96
Dashboard /wp-admin3.34 ▼0.0056.24 ▼3.96
Posts /wp-admin/edit.php3.46 ▲0.1050.30 ▲7.62
Add New Post /wp-admin/post-new.php5.94 ▲0.0693.19 ▼5.72
Media Library /wp-admin/upload.php3.27 ▲0.0437.53 ▲5.85
Login with Vipps /wp-admin/options-general.php?page=vipps_login_options3.2132.59

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 33 new files
Database: 2 new tables, 7 new options
New tables
wp_vipps_login_sessions
wp_vipps_login_users
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
vipps_login_options2
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Login with Vipps
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5614.32 ▲0.091.53 ▼0.1438.08 ▼4.59
Dashboard /wp-admin2,203 ▲265.63 ▲0.0491.92 ▼8.1542.89 ▲4.01
Posts /wp-admin/edit.php2,114 ▲141.97 ▲0.0239.71 ▲0.3636.22 ▼1.62
Add New Post /wp-admin/post-new.php6,379 ▲4,85327.65 ▲4.42832.34 ▲202.8837.35 ▼18.60
Media Library /wp-admin/upload.php1,411 ▲144.21 ▲0.0296.97 ▼6.8044.80 ▼0.50
Login with Vipps /wp-admin/options-general.php?page=vipps_login_options1,0172.0424.5330.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_vipps_login_sessions
    • wp_vipps_login_users
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • vipps_login_options2

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=vipps_login_options
    • > Notice in wp-content/plugins/login-with-vipps/VippsLogin.class.php+340
    Undefined index: use_vipps_login
    • > GET request to /wp-admin/options-general.php?page=vipps_login_options
    • > Notice in wp-content/plugins/login-with-vipps/VippsLogin.class.php+341
    Undefined index: login_page
    • > GET request to /wp-admin/options-general.php?page=vipps_login_options
    • > Notice in wp-content/plugins/login-with-vipps/VippsLogin.class.php+343
    Undefined index: required_roles

SRP 50% from 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/login-with-vipps/blocks/login-with-vipps.php:114
    • > PHP Fatal error
      Declaration of VippsSession::offsetGet(mixed $offset): mixed must be compatible with ArrayAccess::offsetGet($offset) in wp-content/plugins/login-with-vipps/VippsSession.class.php on line 64

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 issues were found

Optimizations

Plugin configuration Passed 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
3 plugin tags: vipps, login, woocommerce

login-with-vipps/login-with-vipps.php Passed 13 tests

The primary PHP file in "Login with Vipps" version 1.2.7 is used by WordPress to initiate all plugin functionality
71 characters long description:
No need to remember passwords ever again. Vipps, and you are logged in.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected3,606 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP95306522,650
PO File1119123446
CSS43039232
JavaScript54777193
SVG30185

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity74.83
▷ Minimum class complexity11.00
▷ Maximum class complexity195.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods177
▷ Static methods2212.43%
▷ Public methods16392.09%
▷ Protected methods95.08%
▷ Private methods52.82%
Functions11
▷ Named functions218.18%
▷ Anonymous functions981.82%
Constants1
▷ Global constants1100.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
7 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
docs/images/mp.png0.42KB0.25KB▼ 38.88%
img/logginn.png11.99KB4.63KB▼ 61.39%
docs/images/vipps.png0.34KB0.24KB▼ 29.65%
img/vipps_logo_negativ_rgb.png54.24KB19.04KB▼ 64.90%
img/vipps_logo_negativ_rgb_transparent.png16.36KB7.33KB▼ 55.17%