84% gnu-taler-payment-for-woocommerce

Code Review | GNU Taler Payment Gateway for WooCommerce

WordPress plugin GNU Taler Payment Gateway for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: gnu-taler-payment...
  • Plugin version: 0.9.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-7.4.0
  • WordPress version: 6.3.1
  • First release: Oct 22, 2020
  • Latest release: Feb 27, 2023
  • Number of updates: 8
  • Update frequency: every 107.4 days
  • Top authors: gnutaler (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 457 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by GNU Taler Payment Gateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.45 ▼8.48
Dashboard /wp-admin3.31 ▲0.0046.88 ▼4.18
Posts /wp-admin/edit.php3.36 ▲0.0049.89 ▼3.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.53 ▼18.73
Media Library /wp-admin/upload.php3.23 ▲0.0034.29 ▲1.46

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GNU Taler Payment Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.301.78 ▼0.5240.80 ▼1.78
Dashboard /wp-admin2,206 ▲184.80 ▼0.10105.07 ▼5.0439.80 ▼6.64
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0641.75 ▲0.5337.10 ▲1.83
Add New Post /wp-admin/post-new.php1,533 ▲1922.95 ▲5.48593.50 ▼98.2648.24 ▼13.04
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.02100.81 ▼0.2440.30 ▼4.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/gnu-taler-payment-for-woocommerce/class-wc-gnutaler-gateway.php on line 47
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/gnu-taler-payment-for-woocommerce/class-wc-gnutaler-gateway.php on line 47
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gnu-taler-payment-for-woocommerce/class-wc-gnutaler-gateway.php on line 47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: payment gateway, woocommerce, e-commerce, taler

gnu-taler-payment-for-woocommerce/class-wc-gnutaler-gateway.php 85% from 13 tests

The main file in "GNU Taler Payment Gateway for WooCommerce" v. 0.9.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gnu-taler-payment-for-woocommerce.php" instead of "class-wc-gnutaler-gateway.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.1" instead of "2.2")

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
No dangerous file extensions were detected760 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP174270760

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity69.00
▷ Minimum class complexity69.00
▷ Maximum class complexity69.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1047.62%
▷ Protected methods14.76%
▷ Private methods1047.62%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/taler.png86.45KB39.86KB▼ 53.89%