83% payment-gateway-for-woocommerce-by-helcim

Code Review | Payment Gateway for WooCommerce - Helcim

WordPress plugin Payment Gateway for WooCommerce - Helcim scored83%from 54 tests.

About plugin

  • Plugin page: payment-gateway-f...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 3, 2015
  • Latest release: Apr 28, 2017
  • Number of updates: 93
  • Update frequency: every 5.5 days
  • Top authors: Helcim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,177 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.42ms] Passed 4 tests

Analyzing server-side resources used by Payment Gateway for WooCommerce - Helcim
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.96 ▲5.75
Dashboard /wp-admin3.31 ▲0.0157.09 ▲1.27
Posts /wp-admin/edit.php3.36 ▲0.0046.80 ▼2.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.36 ▼11.85
Media Library /wp-admin/upload.php3.23 ▲0.0037.75 ▲3.23

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Payment Gateway for WooCommerce - Helcim
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.68 ▼0.962.05 ▼0.2642.07 ▼1.22
Dashboard /wp-admin2,221 ▲184.86 ▼0.22108.56 ▲4.6439.88 ▼4.87
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0037.84 ▲0.7730.22 ▼6.85
Add New Post /wp-admin/post-new.php1,548 ▲1522.99 ▼0.19617.40 ▼59.5056.86 ▼15.25
Media Library /wp-admin/upload.php1,403 ▲34.21 ▼0.0498.64 ▼12.8842.80 ▼3.46

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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 | 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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/payment-gateway-for-woocommerce-by-helcim/index.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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Requires at least: Invalid version format
  • Screenshots: Screenshot #1 (Helcim Direct Integration screenshot) image missing
  • Tags: Too many tags (28 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

payment-gateway-for-woocommerce-by-helcim/index.php 92% from 13 tests

The entry point to "Payment Gateway for WooCommerce - Helcim" version 1.0.7 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payment-gateway-for-woocommerce-by-helcim.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected368 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3106181368

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/helcim_checkout_logo.png22.67KB2.99KB▼ 86.82%