90% sumup-payment-gateway-for-woocommerce

Code Review | SumUp Payment Gateway For WooCommerce

WordPress plugin SumUp Payment Gateway For WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: sumup-payment-gat...
  • Plugin version: 2.4.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 2, 2020
  • Latest release: Nov 9, 2023
  • Number of updates: 26
  • Update frequency: every 52.6 days
  • Top authors: sumup (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

7,000+ active /60,418 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.57ms] Passed 4 tests

This is a short check of server-side resources used by SumUp Payment Gateway For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.94 ▼0.68
Dashboard /wp-admin3.33 ▲0.0345.66 ▲1.49
Posts /wp-admin/edit.php3.38 ▲0.0348.49 ▼1.99
Add New Post /wp-admin/post-new.php5.91 ▲0.0378.95 ▼5.10
Media Library /wp-admin/upload.php3.25 ▲0.0335.68 ▲2.39

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SumUp Payment Gateway For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3514.13 ▼0.581.73 ▼0.1239.79 ▼4.34
Dashboard /wp-admin2,202 ▲255.59 ▲0.0587.42 ▼5.2539.59 ▼0.48
Posts /wp-admin/edit.php2,104 ▲41.97 ▲0.0239.65 ▲4.0538.82 ▲7.40
Add New Post /wp-admin/post-new.php1,533 ▲723.13 ▲0.24607.78 ▼55.8650.89 ▲4.20
Media Library /wp-admin/upload.php1,401 ▲14.22 ▼0.0097.48 ▼3.4441.72 ▼0.55

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: payments, ecommerce, sumup, woocommerce, payment gateway

sumup-payment-gateway-for-woocommerce/sumup-payment-gateway-for-woocommerce.php Passed 13 tests

"SumUp Payment Gateway For WooCommerce" version 2.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
52 characters long description:
Take credit card payments on your store using SumUp.

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
Good job! No executable or dangerous file extensions detected930 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5157250928
JavaScript2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity50.00
▷ Minimum class complexity5.00
▷ Maximum class complexity95.00
Average method complexity6.76
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin