83% sepa-payment-gateway-for-woocommerce

Code Review | SEPA Payment Gateway for WooCommerce

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

About plugin

  • Plugin page: sepa-payment-gate...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6 or later+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0
  • WordPress version: 6.3.1
  • First release: Jul 20, 2022
  • Latest release: Jul 20, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: nhathuynhvandotcom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /983 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.12MB] [CPU: ▼4.88ms] Passed 4 tests

An overview of server-side resources used by SEPA Payment Gateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.22 ▼3.34
Dashboard /wp-admin3.43 ▲0.0855.31 ▼10.99
Posts /wp-admin/edit.php3.54 ▲0.1855.06 ▲8.34
Add New Post /wp-admin/post-new.php6.01 ▲0.1294.20 ▼4.31
Media Library /wp-admin/upload.php3.35 ▲0.1235.86 ▼0.88

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SEPA Payment Gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.64 ▼0.764.53 ▲2.7541.76 ▼1.42
Dashboard /wp-admin2,208 ▲175.80 ▼0.1099.99 ▼8.3041.37 ▼0.13
Posts /wp-admin/edit.php2,094 ▲82.04 ▲0.0140.38 ▲1.7936.19 ▲0.32
Add New Post /wp-admin/post-new.php1,533 ▲1323.43 ▼0.11626.97 ▼76.6950.81 ▼9.17
Media Library /wp-admin/upload.php1,390 ▲24.25 ▼0.06109.24 ▲3.7940.94 ▼3.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 18× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Digitick\\Sepa\\TransferInformation\\BaseTransferInformation' not found in wp-content/plugins/sepa-payment-gateway-for-woocommerce/vendor/digitick/sepa-xml/src/TransferInformation/CustomerDirectDebitTransferInformation.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Digitick\\Sepa\\TransferFile\\BaseTransferFile' not found in wp-content/plugins/sepa-payment-gateway-for-woocommerce/vendor/digitick/sepa-xml/src/TransferFile/CustomerDirectDebitTransferFile.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Digitick\\Sepa\\TransferFile\\BaseTransferFile' not found in wp-content/plugins/sepa-payment-gateway-for-woocommerce/vendor/digitick/sepa-xml/src/TransferFile/CustomerCreditTransferFile.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'Digitick\\Sepa\\TransferFile\\TransferFileInterface' not found in wp-content/plugins/sepa-payment-gateway-for-woocommerce/vendor/digitick/sepa-xml/src/TransferFile/BaseTransferFile.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'Digitick\\Sepa\\TransferFile\\Facade\\CustomerTransferFileFacadeInterface' not found in wp-content/plugins/sepa-payment-gateway-for-woocommerce/vendor/digitick/sepa-xml/src/TransferFile/Facade/BaseCustomerTransferFileFacade.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Digitick\\Sepa\\DomBuilder\\BaseDomBuilder' not found in wp-content/plugins/sepa-payment-gateway-for-woocommerce/vendor/digitick/sepa-xml/src/DomBuilder/CustomerCreditTransferDomBuilder.php:34
    • > PHP Fatal error
      Uncaught Error: Interface 'Digitick\\Sepa\\TransferInformation\\TransferInformationInterface' not found in wp-content/plugins/sepa-payment-gateway-for-woocommerce/vendor/digitick/sepa-xml/src/TransferInformation/BaseTransferInformation.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Digitick\\Sepa\\TransferFile\\Facade\\BaseCustomerTransferFileFacade' not found in wp-content/plugins/sepa-payment-gateway-for-woocommerce/vendor/digitick/sepa-xml/src/TransferFile/Facade/CustomerCreditFacade.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Digitick\\Sepa\\Exception\\Exception' not found in wp-content/plugins/sepa-payment-gateway-for-woocommerce/vendor/digitick/sepa-xml/src/Exception/InvalidTransferFileConfiguration.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Digitick\\Sepa\\DomBuilder\\DomBuilderInterface' not found in wp-content/plugins/sepa-payment-gateway-for-woocommerce/vendor/digitick/sepa-xml/src/DomBuilder/BaseDomBuilder.php:28

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 86% 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
7 plugin tags: disable gutenberg, blocks, classic editor, block editor, gutenberg...

sepa-payment-gateway-for-woocommerce/index.php 69% from 13 tests

The main PHP script in "SEPA Payment Gateway for WooCommerce" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "4.9")
  • Requires PHP: Required version number formatted incorrectly (ex. "7.0" instead of "5.6 or later")
  • Main file name: The principal plugin file should be the same as the plugin slug ("sepa-payment-gateway-for-woocommerce.php" instead of "index.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
There were no executable files found in this plugin3,170 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP436191,3862,641
Markdown41540342
JSON300110
JavaScript12341
XML13023
YAML1309
CSS1003
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.62
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces10
Interfaces4
Traits0
Classes30
▷ Abstract classes310.00%
▷ Concrete classes2790.00%
▷ Final classes00.00%
Methods230
▷ Static methods2410.43%
▷ Public methods22196.09%
▷ Protected methods52.17%
▷ Private methods41.74%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants8
▷ Global constants450.00%
▷ Class constants450.00%
▷ Public constants4100.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.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendor/digitick/sepa-xml/doc/structure.png38.51KB15.96KB▼ 58.56%