10% fintecture-payment-gateway

Code Review | Pay by Immediate Transfer (by Fintecture)

WordPress plugin Pay by Immediate Transfer (by Fintecture) scored10%from 54 tests.

About plugin

  • Plugin page: fintecture-paymen...
  • Plugin version: 3.8.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 3, 2019
  • Latest release: Nov 15, 2023
  • Number of updates: 109
  • Update frequency: every 13.3 days
  • Top authors: hugoposnic (46.79%)fintecture (36.7%)quentinfintecture (18.35%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,580 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Error in wp-content/plugins/fintecture-payment-gateway/includes/fix-for-php-scoper.php+9
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/fintecture-payment-gateway/includes/fix-for-php-scoper.php:9
    Stack trace:
    #0 wp-content/plugins/fintecture-payment-gateway/includes/stats.php(15): FintectureWC\get_wc_instance()
    #1 wp-content/plugins/fintecture-payment-gateway/fintecture-payment-gateway.php(101): FintectureWC\fintectureSystemInfos()
    #2 wp-includes/class-wp-hook.php(310): FintectureWC\WC_Fintecture_Main::install()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.23ms] Passed 4 tests

This is a short check of server-side resources used by Pay by Immediate Transfer (by Fintecture)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.16 ▼7.37
Dashboard /wp-admin3.31 ▼0.0444.12 ▼15.40
Posts /wp-admin/edit.php3.36 ▲0.0047.58 ▼1.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.43 ▼4.29
Media Library /wp-admin/upload.php3.23 ▲0.0034.00 ▲1.10

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 290 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Pay by Immediate Transfer (by Fintecture)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲3914.23 ▼0.471.64 ▼0.2137.87 ▼7.22
Dashboard /wp-admin2,195 ▲185.61 ▼0.0097.42 ▼0.3243.96 ▼1.74
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0241.26 ▲4.8135.29 ▲1.42
Add New Post /wp-admin/post-new.php1,526 ▼1023.34 ▲0.17672.54 ▼16.6449.54 ▼8.19
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.0099.41 ▲1.7541.98 ▼2.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Error in wp-content/plugins/fintecture-payment-gateway/includes/fix-for-php-scoper.php+9
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/fintecture-payment-gateway/includes/fix-for-php-scoper.php:9
    Stack trace:
    #0 wp-content/plugins/fintecture-payment-gateway/includes/stats.php(15): FintectureWC\get_wc_instance()
    #1 wp-content/plugins/fintecture-payment-gateway/fintecture-payment-gateway.php(137): FintectureWC\fintectureSystemInfos()
    #2 wp-includes/class-wp-hook.php(310): FintectureWC\WC_Fintecture_Main::uninstall()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/includes/plugin.php(1269): do_action()
    #6 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall successfully, leaving 290 files (2.01MB) in the plugin directory
    • (new file) assets/img/admin/checkout_design/fr/it-st-short-design.svg
    • (new file) assets/img/admin/checkout_design/fr/it-st-long-design.svg
    • (new file) assets/css/wc-gateway-settings.css
    • (new file) assets/img/admin/checkout_design/en/it-st-short-design.svg
    • (new file) assets/img/admin/checkout_design/en/it-st-long-design.svg
    • (new file) assets/img/admin/checkout_design/en/it-design.svg
    • (new file) assets/img/arrow_bottom.png
    • (new file) LICENSE.txt
    • (new file) assets/css/shop.css
    • (new file) assets/img/admin/checkout_design/fr/it-design.svg
    • ...
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • recovery_mode_email_last_sent

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 170× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'FintectureWC\\Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/fintecture-payment-gateway/vendor/psr/http-message/src/RequestInterface.php:25
    • > PHP Notice
      Undefined variable: imgPath in wp-content/plugins/fintecture-payment-gateway/views/checkout-description.php on line 33
    • > PHP Fatal error
      Uncaught Error: Interface 'FintectureWC\\Http\\Discovery\\Exception' not found in wp-content/plugins/fintecture-payment-gateway/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'FintectureWC\\Fintecture\\Api\\Api' not found in wp-content/plugins/fintecture-payment-gateway/vendor/fintecture/fintecture-sdk-php/src/Api/Pis/RequestForPayout.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'FintectureWC\\GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/fintecture-payment-gateway/vendor/guzzlehttp/psr7/src/ServerRequest.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'FintectureWC\\GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/fintecture-payment-gateway/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'FintectureWC\\Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/fintecture-payment-gateway/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'FintectureWC\\Fintecture\\Api\\Api' not found in wp-content/plugins/fintecture-payment-gateway/vendor/fintecture/fintecture-sdk-php/src/Api/Pis/Connect.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'FintectureWC\\GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/fintecture-payment-gateway/vendor/guzzlehttp/promises/src/EachPromise.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FintectureWC\\Http\\Discovery\\ClassDiscovery' not found in wp-content/plugins/fintecture-payment-gateway/vendor/php-http/discovery/src/HttpClientDiscovery.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (21 tag instead of maximum 10)
Please take inspiration from this readme.txt

fintecture-payment-gateway/fintecture-payment-gateway.php Passed 13 tests

The primary PHP file in "Pay by Immediate Transfer (by Fintecture)" version 3.8.3 is used by WordPress to initiate all plugin functionality
90 characters long description:
Extends WooCommerce by enabling users to pay securely and directly from their bank account

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin15,669 lines of code in 282 files:
LanguageFilesBlank linesComment linesLines of code
PHP2566278,97014,293
JSON3001,051
JavaScript1284189
CSS215068
SVG170030
Dockerfile16217
XML10014
YAML1007

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity10.04
▷ Minimum class complexity1.00
▷ Maximum class complexity142.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces38
Interfaces32
Traits7
Classes181
▷ Abstract classes42.21%
▷ Concrete classes17797.79%
▷ Final classes7542.37%
Methods1,185
▷ Static methods22318.82%
▷ Public methods99083.54%
▷ Protected methods282.36%
▷ Private methods16714.09%
Functions151
▷ Named functions5133.77%
▷ Anonymous functions10066.23%
Constants81
▷ Global constants22.47%
▷ Class constants7997.53%
▷ Public constants6481.01%

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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/arrow_top.png0.26KB0.22KB▼ 12.21%
assets/img/arrow_bottom.png0.27KB0.24KB▼ 11.55%