84% woocommerce-novalnet-gateway

Code Review | WooCommerce payment plugin - Novalnet AG

WordPress plugin WooCommerce payment plugin - Novalnet AG scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-noval...
  • Plugin version: 12.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 13, 2013
  • Latest release: Nov 22, 2023
  • Number of updates: 341
  • Update frequency: every 11.3 days
  • Top authors: Novalnet (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active /94,369 total downloads

Benchmarks

Plugin footprint 83% from 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 gracefully, with no errors

Server metrics [RAM: ▲0.24MB] [CPU: ▼11.39ms] Passed 4 tests

Server-side resources used by WooCommerce payment plugin - Novalnet AG
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2038.41 ▼4.35
Dashboard /wp-admin3.55 ▲0.2043.99 ▼17.16
Posts /wp-admin/edit.php3.65 ▲0.2946.26 ▼0.18
Add New Post /wp-admin/post-new.php6.22 ▲0.3374.10 ▼21.78
Media Library /wp-admin/upload.php3.49 ▲0.2531.71 ▼2.25

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 150 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce payment plugin - Novalnet AG
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3714.11 ▼0.081.68 ▼0.0639.96 ▼3.52
Dashboard /wp-admin2,204 ▲235.65 ▼0.0491.40 ▼7.5441.81 ▲3.62
Posts /wp-admin/edit.php2,109 ▲91.95 ▼0.0539.77 ▲0.9639.14 ▲3.44
Add New Post /wp-admin/post-new.php1,535 ▲922.85 ▼0.39604.35 ▼29.2749.84 ▲2.85
Media Library /wp-admin/upload.php1,406 ▲34.10 ▼0.1298.08 ▼2.5942.04 ▼0.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Novalnet_Configuration' not found in wp-content/plugins/woocommerce-novalnet-gateway/includes/class-wc-novalnet-webhook.php:1142

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: novalnet payment, payments, credit cards, payment gateway

woocommerce-novalnet-gateway/novalnet-payment-gateway.php 85% from 13 tests

The main PHP file in "WooCommerce payment plugin - Novalnet AG" ver. 12.6.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "5.0.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-novalnet-gateway.php" instead of "novalnet-payment-gateway.php")

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
Good job! No executable or dangerous file extensions detected13,961 lines of code in 111 files:
LanguageFilesBlank linesComment linesLines of code
PHP792,5706,67611,013
JavaScript291772042,525
CSS170304
SVG202119

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.55
Average class complexity29.39
▷ Minimum class complexity2.00
▷ Maximum class complexity324.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes64
▷ Abstract classes11.56%
▷ Concrete classes6398.44%
▷ Final classes2438.10%
Methods636
▷ Static methods589.12%
▷ Public methods636100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions45
▷ Named functions4497.78%
▷ Anonymous functions12.22%
Constants2
▷ Global constants2100.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
33 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/novalnet_paypal.png1.93KB1.70KB▼ 11.94%
assets/images/novalnet_online_bank_transfer.png5.28KB2.54KB▼ 51.93%
assets/images/novalnet_multibanco.png2.05KB1.04KB▼ 49.29%
assets/images/novalnet_invoice.png0.60KB0.77KB0.00%
assets/images/novalnet_postfinance_card.png2.79KB1.85KB▼ 33.78%