89% vipps-recurring-payments-gateway-for-woocommerce

Code Review | Vipps Recurring Payments for WooCommerce

WordPress plugin Vipps Recurring Payments for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: vipps-recurring-p...
  • Plugin version: 1.17.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Feb 25, 2020
  • Latest release: Dec 1, 2023
  • Number of updates: 103
  • Update frequency: every 13.4 days
  • Top authors: marcuz2k2k (94.17%)vipps (6.8%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /8,590 total downloads

Benchmarks

Plugin footprint 83% from 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.66ms] Passed 4 tests

Analyzing server-side resources used by Vipps Recurring Payments for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1135.37 ▼4.58
Dashboard /wp-admin3.40 ▲0.1044.89 ▼4.84
Posts /wp-admin/edit.php3.52 ▲0.1644.81 ▼2.53
Add New Post /wp-admin/post-new.php5.99 ▲0.1090.51 ▼6.67
Media Library /wp-admin/upload.php3.33 ▲0.1034.54 ▲3.16

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
woo-vipps-recurring-version
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Vipps Recurring Payments for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.29 ▲0.031.71 ▲0.0137.54 ▼4.27
Dashboard /wp-admin2,195 ▲155.59 ▼0.0391.01 ▲0.1142.49 ▲1.24
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0739.80 ▲2.5734.73 ▼2.92
Add New Post /wp-admin/post-new.php1,526 ▼1923.01 ▼2.18614.82 ▼39.4354.33 ▼7.11
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.03100.04 ▲3.2343.09 ▲0.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • woo-vipps-recurring-version
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
5 plugin tags: woocommerce subscriptions, subscriptions, recurring payments, vipps, woocommerce

vipps-recurring-payments-gateway-for-woocommerce/woo-vipps-recurring.php 77% from 13 tests

The entry point to "Vipps Recurring Payments for WooCommerce" version 1.17.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "4.4")
  • Main file name: The principal plugin file should be the same as the plugin slug ("vipps-recurring-payments-gateway-for-woocommerce.php" instead of "woo-vipps-recurring.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected4,063 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,1011,4513,599
PO File1121164372
JavaScript19054
CSS26036
SVG2002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity22.74
▷ Minimum class complexity1.00
▷ Maximum class complexity214.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes00.00%
Methods245
▷ Static methods4819.59%
▷ Public methods21888.98%
▷ Protected methods135.31%
▷ Private methods145.71%
Functions15
▷ Named functions426.67%
▷ Anonymous functions1173.33%
Constants69
▷ Global constants811.59%
▷ Class constants6188.41%
▷ Public constants61100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/vipps-logg-inn-neg.png20.10KB10.72KB▼ 46.68%
assets/images/vipps-rgb-black.png25.32KB11.92KB▼ 52.92%
assets/images/vipps-icon-smile.png3.96KB1.91KB▼ 51.65%
assets/images/vipps_logo_negative_rgb.png54.24KB19.04KB▼ 64.90%
assets/images/vipps-logo-negative-rgb-transparent.png16.36KB7.33KB▼ 55.17%