77% woo-payment-gateway-paysera

Code Review | WooCommerce Payment Gateway - Paysera

WordPress plugin WooCommerce Payment Gateway - Paysera scored77%from 54 tests.

About plugin

  • Plugin page: woo-payment-gatew...
  • Plugin version: 3.4.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 9, 2018
  • Latest release: Aug 31, 2023
  • Number of updates: 88
  • Update frequency: every 22.8 days
  • Top authors: paysera (98.86%)payserarokas (2.27%)

Code review

54 tests

User reviews

15 reviews

Install metrics

8,000+ active /93,597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by WooCommerce Payment Gateway - Paysera
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0041.50 ▼0.99
Dashboard /wp-admin3.35 ▲0.0047.69 ▼3.77
Posts /wp-admin/edit.php3.40 ▲0.0066.57 ▲11.24
Add New Post /wp-admin/post-new.php5.93 ▲0.0089.15 ▼15.19
Media Library /wp-admin/upload.php3.27 ▲0.0038.96 ▲0.20

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Payment Gateway - Paysera
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.33 ▼0.021.79 ▼0.0743.65 ▼0.81
Dashboard /wp-admin2,198 ▲215.57 ▲0.0185.14 ▼14.3338.02 ▼4.49
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0242.54 ▲6.1035.43 ▼1.43
Add New Post /wp-admin/post-new.php1,531 ▼022.53 ▼0.47695.41 ▲93.4657.31 ▲5.81
Media Library /wp-admin/upload.php1,397 ▼64.18 ▲0.02112.80 ▲10.3147.78 ▲2.57

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woo-payment-gateway-paysera/vendor/willdurand/jsonp-callback-validator/tests/bootstrap.php
  • 616× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Config\\Resource\\SelfCheckingResourceInterface' not found in wp-content/plugins/woo-payment-gateway-paysera/vendor/symfony/config/Resource/ComposerResource.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/woo-payment-gateway-paysera/vendor-scoped/guzzlehttp/psr7/src/CachingStream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\DependencyInjection\\ContainerInterface' not found in wp-content/plugins/woo-payment-gateway-paysera/vendor/symfony/dependency-injection/TaggedContainerInterface.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Paysera\\Component\\Serializer\ormalizer\\DenormalizerInterface' not found in wp-content/plugins/woo-payment-gateway-paysera/vendor/paysera/lib-serializer/src/Normalizer/TransformerDenormalizer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Validator\\Exception\\RuntimeException' not found in wp-content/plugins/woo-payment-gateway-paysera/vendor/symfony/validator/Exception/ValidatorException.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Config\\Definition\\Builder\\BuilderAwareInterface' not found in wp-content/plugins/woo-payment-gateway-paysera/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Validator\\Constraint' not found in wp-content/plugins/woo-payment-gateway-paysera/vendor/symfony/validator/Constraints/Type.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Validator\\Constraints\\AbstractComparisonValidator' not found in wp-content/plugins/woo-payment-gateway-paysera/vendor/symfony/validator/Constraints/IdenticalToValidator.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Config\\Loader\\Loader' not found in wp-content/plugins/woo-payment-gateway-paysera/vendor/symfony/dependency-injection/Loader/ClosureLoader.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Config\\Definition\odeInterface' not found in wp-content/plugins/woo-payment-gateway-paysera/vendor/symfony/config/Definition/BaseNode.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
Please take inspiration from this readme.txt

woo-payment-gateway-paysera/paysera.php 77% from 13 tests

The entry point to "WooCommerce Payment Gateway - Paysera" version 3.4.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-payment-gateway-paysera.php" instead of "paysera.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.0.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin119,881 lines of code in 1,173 files:
LanguageFilesBlank linesComment linesLines of code
PHP98213,30531,29887,250
XML6313922,461
JSON39004,296
Markdown581,03602,790
PO File564051,743
XSD2482463
YAML107712354
JavaScript7741314
CSS4440183
SVG20025
Bourne Shell1002

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity11.29
▷ Minimum class complexity1.00
▷ Maximum class complexity583.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces133
Interfaces137
Traits31
Classes796
▷ Abstract classes303.77%
▷ Concrete classes76696.23%
▷ Final classes7710.05%
Methods4,870
▷ Static methods3787.76%
▷ Public methods4,10884.35%
▷ Protected methods2334.78%
▷ Private methods52910.86%
Functions392
▷ Named functions17243.88%
▷ Anonymous functions22056.12%
Constants788
▷ Global constants607.61%
▷ Class constants72892.39%
▷ Public constants64989.15%

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
PNG images were not found in this plugin