83% payever-woocommerce-gateway

Code Review | payever - WooCommerce Gateway

WordPress plugin payever - WooCommerce Gateway scored83%from 54 tests.

About plugin

  • Plugin page: payever-woocommer...
  • Plugin version: 2.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.14-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 14, 2016
  • Latest release: Nov 28, 2023
  • Number of updates: 208
  • Update frequency: every 12.5 days
  • Top authors: payever (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /11,910 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
Install script ran successfully

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

An overview of server-side resources used by payever - WooCommerce Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.73 ▼4.19
Dashboard /wp-admin3.31 ▲0.0045.13 ▼5.12
Posts /wp-admin/edit.php3.36 ▲0.0048.70 ▲1.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.30 ▼3.91
Media Library /wp-admin/upload.php3.23 ▲0.0034.97 ▲3.18

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 527 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

payever - WooCommerce Gateway: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.69 ▲0.361.73 ▲0.1936.12 ▼6.68
Dashboard /wp-admin2,198 ▲175.61 ▼0.0692.63 ▼17.8143.98 ▼2.46
Posts /wp-admin/edit.php2,101 ▲11.96 ▼0.0240.06 ▲1.7732.05 ▼0.99
Add New Post /wp-admin/post-new.php1,526 ▲8623.13 ▲4.97598.99 ▼116.2857.00 ▲8.15
Media Library /wp-admin/upload.php1,394 ▼94.26 ▲0.0695.94 ▼3.3241.64 ▼1.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 257× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Payever\\Sdk\\Core\\Http\\ResponseEntity' not found in wp-content/plugins/payever-woocommerce-gateway/vendor/payever/payments-sdk-php/lib/Payever/Payments/Http/ResponseEntity/ListPaymentsResponse.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Payever\\Tests\\Unit\\Payever\\Core\\Http\\AbstractMessageEntityTest' not found in wp-content/plugins/payever-woocommerce-gateway/vendor/payever/payments-sdk-php/tests/Unit/Payever/Payments/Http/MessageEntity/SplitItemEntityTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Payever\\Tests\\Unit\\Payever\\Core\\Http\\AbstractMessageEntityTest' not found in wp-content/plugins/payever-woocommerce-gateway/vendor/payever/payments-sdk-php/tests/Unit/Payever/Payments/Http/ResponseEntity/ListPaymentOptionsWithVariantsResponseTest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Payever\\Sdk\\Core\\CommonProductsThirdPartyApiClient' not found in wp-content/plugins/payever-woocommerce-gateway/vendor/payever/products-sdk-php/lib/Payever/Products/ProductsApiClient.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Payever\\Sdk\\Core\\Http\\ResponseEntity' not found in wp-content/plugins/payever-woocommerce-gateway/vendor/payever/payments-sdk-php/lib/Payever/Payments/Http/ResponseEntity/LatePaymentsResponse.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Payever\\Sdk\\Core\\Http\\MessageEntity\\ResultEntity' not found in wp-content/plugins/payever-woocommerce-gateway/vendor/payever/payments-sdk-php/lib/Payever/Payments/Http/MessageEntity/CompanySearchResultEntity.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Payever\\Sdk\\Core\\Http\\RequestEntity' not found in wp-content/plugins/payever-woocommerce-gateway/vendor/payever/payments-sdk-php/lib/Payever/Payments/Http/RequestEntity/CreatePaymentRequest.php:87
    • > PHP Fatal error
      Uncaught Error: Class 'Payever\\Sdk\\Core\\Http\\MessageEntity\\ResultEntity' not found in wp-content/plugins/payever-woocommerce-gateway/vendor/payever/payments-sdk-php/lib/Payever/Payments/Http/MessageEntity/InvoicePaymentResultEntity.php:63
    • > PHP Fatal error
      Uncaught Error: Class 'Payever\\Tests\\Unit\\Payever\\Core\\Http\\AbstractMessageEntityTest' not found in wp-content/plugins/payever-woocommerce-gateway/vendor/payever/payments-sdk-php/tests/Unit/Payever/Payments/Http/MessageEntity/PaymentDetailsEntityTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Payever\\Sdk\\Payments\\PaymentsApiClient' not found in wp-content/plugins/payever-woocommerce-gateway/vendor/payever/payments-sdk-php/lib/Payever/Payments/WidgetsApiClient.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #10, #2, #3, #4, #5, #6, #7, #8, #9 in payever-woocommerce-gateway/assets to your readme.txt
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

payever-woocommerce-gateway/woocommerce-payever-gateway.php 85% from 13 tests

The principal PHP file in "payever - WooCommerce Gateway" v. 2.3.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.4" instead of "2.6.14")
  • Main file name: Name the main plugin file the same as the plugin slug ("payever-woocommerce-gateway.php" instead of "woocommerce-payever-gateway.php")

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
Success! There were no dangerous files found in this plugin22,736 lines of code in 414 files:
LanguageFilesBlank linesComment linesLines of code
PHP3855,59814,66220,195
PO File34252181,021
JSON700552
Markdown92140541
JavaScript43915267
CSS217685
XML30165
YAML10010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.77
▷ Minimum class complexity1.00
▷ Maximum class complexity172.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces71
Interfaces23
Traits19
Classes333
▷ Abstract classes113.30%
▷ Concrete classes32296.70%
▷ Final classes00.00%
Methods1,523
▷ Static methods1187.75%
▷ Public methods1,25482.34%
▷ Protected methods1197.81%
▷ Private methods1509.85%
Functions16
▷ Named functions16.25%
▷ Anonymous functions1593.75%
Constants282
▷ Global constants124.26%
▷ Class constants27095.74%
▷ Public constants270100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/santander_installment_dk.png5.98KB3.58KB▼ 40.18%
assets/images/invoice.png6.19KB4.06KB▼ 34.41%
assets/images/santander_installment_se.png5.98KB3.58KB▼ 40.18%
assets/images/payex_faktura.png6.77KB3.79KB▼ 43.93%
assets/images/stripe.png6.91KB3.72KB▼ 46.25%