84% multisafepay

Code Review | MultiSafepay plugin for WooCommerce

WordPress plugin MultiSafepay plugin for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: multisafepay
  • Plugin version: 6.2.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 6, 2020
  • Latest release: Nov 13, 2023
  • Number of updates: 100
  • Update frequency: every 14.1 days
  • Top authors: multisafepayplugin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active /54,341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by MultiSafepay plugin for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.13 ▼4.40
Dashboard /wp-admin3.31 ▼0.0444.01 ▼18.21
Posts /wp-admin/edit.php3.36 ▲0.0047.43 ▲1.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.39 ▲5.19
Media Library /wp-admin/upload.php3.23 ▲0.0036.89 ▲5.33

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

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

Browser metrics Passed 4 tests

MultiSafepay plugin for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.32 ▼0.061.81 ▼0.3342.43 ▼2.30
Dashboard /wp-admin2,195 ▲205.61 ▼0.1190.61 ▼20.1344.12 ▼1.84
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0339.62 ▲5.9042.34 ▲6.38
Add New Post /wp-admin/post-new.php1,526 ▼123.00 ▼0.15587.69 ▼105.1758.48 ▼2.41
Media Library /wp-admin/upload.php1,400 ▼04.27 ▲0.0897.52 ▲3.6643.00 ▲1.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 86× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MultiSafepay\\Api\\Base\\DataObject' not found in wp-content/plugins/multisafepay/vendor/multisafepay/php-sdk/src/Api/Transactions/TransactionResponse/RelatedTransaction.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Discovery\\Exception' not found in wp-content/plugins/multisafepay/vendor/php-http/discovery/src/Exception/NotFoundException.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'MultiSafepay\\Api\\Transactions\\OrderRequest\\Arguments\\GatewayInfoInterface' not found in wp-content/plugins/multisafepay/vendor/multisafepay/php-sdk/src/Api/Transactions/OrderRequest/Arguments/GatewayInfo/Wallet.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'MultiSafepay\\ValueObject\\CartItem' not found in wp-content/plugins/multisafepay/vendor/multisafepay/php-sdk/src/Api/Transactions/OrderRequest/Arguments/ShoppingCart/ShippingItem.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'MultiSafepay\\ValueObject\\CartItem' not found in wp-content/plugins/multisafepay/vendor/multisafepay/php-sdk/src/Api/Transactions/OrderRequest/Arguments/ShoppingCart/Item.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'MultiSafepay\\Api\\AbstractManager' not found in wp-content/plugins/multisafepay/vendor/multisafepay/php-sdk/src/Api/TokenManager.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Discovery\\Strategy\\DiscoveryStrategy' not found in wp-content/plugins/multisafepay/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Discovery\\ClassDiscovery' not found in wp-content/plugins/multisafepay/vendor/php-http/discovery/src/StreamFactoryDiscovery.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestFactoryInterface' not found in wp-content/plugins/multisafepay/vendor/php-http/discovery/src/Psr17Factory.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'MultiSafepay\\Api\\Base\\DataObject' not found in wp-content/plugins/multisafepay/vendor/multisafepay/php-sdk/src/Api/Transactions/TransactionResponse/OrderAdjustment.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

multisafepay/multisafepay.php Passed 13 tests

The primary PHP file in "MultiSafepay plugin for WooCommerce" version 6.2.0 is used by WordPress to initiate all plugin functionality
27 characters long description:
MultiSafepay Payment Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin14,355 lines of code in 240 files:
LanguageFilesBlank linesComment linesLines of code
PHP2082,4367,19710,696
Markdown1861701,674
PO File1259367908
JSON700646
JavaScript3526256
CSS240167
XML1008

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.29
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces45
Interfaces23
Traits5
Classes166
▷ Abstract classes21.20%
▷ Concrete classes16498.80%
▷ Final classes159.15%
Methods1,021
▷ Static methods898.72%
▷ Public methods90688.74%
▷ Protected methods70.69%
▷ Private methods10810.58%
Functions9
▷ Named functions333.33%
▷ Anonymous functions666.67%
Constants111
▷ Global constants32.70%
▷ Class constants10897.30%
▷ Public constants9688.89%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
70 PNG files occupy 0.92MB with 0.52MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/public/img/klarna.png11.79KB4.41KB▼ 62.62%
assets/public/img/fashioncheque.png8.52KB3.95KB▼ 53.61%
assets/public/img/wijncadeau.png13.70KB6.18KB▼ 54.90%
assets/public/img/visa.png10.96KB5.50KB▼ 49.82%
assets/public/img/good4fun.png22.70KB9.19KB▼ 59.53%