78% wc-easycredit

Code Review | easyCredit-Ratenkauf for wooCommerce

WordPress plugin easyCredit-Ratenkauf for wooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: wc-easycredit
  • Plugin version: 2.1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Aug 29, 2018
  • Latest release: Nov 16, 2023
  • Number of updates: 83
  • Update frequency: every 25.3 days
  • Top authors: ratenkaufbyeasycredit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,297 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Server-side resources used by easyCredit-Ratenkauf for wooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.28 ▼0.84
Dashboard /wp-admin3.31 ▼0.0443.59 ▼20.34
Posts /wp-admin/edit.php3.36 ▲0.0044.88 ▼0.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.66 ▼16.77
Media Library /wp-admin/upload.php3.23 ▲0.0037.45 ▲4.71

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for easyCredit-Ratenkauf for wooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.27 ▼0.081.85 ▲0.1040.68 ▼2.76
Dashboard /wp-admin2,195 ▲155.58 ▼0.0889.17 ▼11.5139.54 ▼2.78
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0140.41 ▲1.2336.61 ▼1.22
Add New Post /wp-admin/post-new.php1,526 ▼023.79 ▲0.25694.15 ▼32.8957.16 ▼11.30
Media Library /wp-admin/upload.php1,397 ▼34.19 ▼0.09103.01 ▲4.8945.76 ▲4.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-easycredit/templates/payment-method-title.php
  • 169× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wc-easycredit/vendor/netzkollektiv/ratenkaufbyeasycredit-api-v3-php/test/Api/TransactionApiTest.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Teambank\\RatenkaufByEasyCreditApiV3\\Model\\ModelInterface' not found in wp-content/plugins/wc-easycredit/vendor/netzkollektiv/ratenkaufbyeasycredit-api-v3-php/src/Model/MTan.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wc-easycredit/vendor/netzkollektiv/ratenkaufbyeasycredit-api-v3-php/test/Model/BankTest.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wc-easycredit/vendor/netzkollektiv/ratenkaufbyeasycredit-api-v3-php/test/Model/InterestsTest.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wc-easycredit/vendor/netzkollektiv/ratenkaufbyeasycredit-api-v3-php/test/Api/ServiceintegrationApiTest.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/wc-easycredit/vendor/guzzlehttp/psr7/src/ServerRequest.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Teambank\\RatenkaufByEasyCreditApiV3\\Model\\ModelInterface' not found in wp-content/plugins/wc-easycredit/vendor/netzkollektiv/ratenkaufbyeasycredit-api-v3-php/src/Model/Employment.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Teambank\\RatenkaufByEasyCreditApiV3\\Model\\ModelInterface' not found in wp-content/plugins/wc-easycredit/vendor/netzkollektiv/ratenkaufbyeasycredit-api-v3-php/src/Model/InvoiceAddressAllOf.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wc-easycredit/vendor/netzkollektiv/ratenkaufbyeasycredit-api-v3-php/test/Model/RefundRequestTest.php:42
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wc-easycredit/vendor/guzzlehttp/psr7/src/DroppingStream.php:13

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 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
5 plugin tags: payment, ratenkauf, pay by installments, woocommerce, easycredit

wc-easycredit/woocommerce-gateway-ratenkaufbyeasycredit.php 85% from 13 tests

The principal PHP file in "easyCredit-Ratenkauf for wooCommerce" v. 2.1.6 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-easycredit.php" instead of "woocommerce-gateway-ratenkaufbyeasycredit.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin30,381 lines of code in 368 files:
LanguageFilesBlank linesComment linesLines of code
PHP2616,16521,56725,324
Markdown791,13402,539
PO File2224260850
CSS61513399
JavaScript5663378
Sass1640363
JSON200341
YAML525293
XML20038
Bourne Shell113836
SVG40020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.09
▷ Minimum class complexity1.00
▷ Maximum class complexity320.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces17
Interfaces27
Traits3
Classes207
▷ Abstract classes20.97%
▷ Concrete classes20599.03%
▷ Final classes83.90%
Methods2,941
▷ Static methods53718.26%
▷ Public methods2,82896.16%
▷ Protected methods451.53%
▷ Private methods682.31%
Functions48
▷ Named functions3062.50%
▷ Anonymous functions1837.50%
Constants137
▷ Global constants21.46%
▷ Class constants13598.54%
▷ Public constants13096.30%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 1.17MB with 0.73MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/easycredit-marketing-express-button.png98.60KB41.08KB▼ 58.34%
assets/img/ratenkauf-clickandcollect.png62.37KB28.32KB▼ 54.59%
blocks/easycredit-marketing-card.png247.53KB69.66KB▼ 71.86%
assets/img/easycredit-marketing-widget.png96.28KB39.60KB▼ 58.87%
assets/img/easycredit-marketing-flashbox.png150.43KB43.45KB▼ 71.12%