84% super-payments

Code Review | Super Payments - WooCommerce Payment Gateway

WordPress plugin Super Payments - WooCommerce Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: super-payments
  • Plugin version: 1.16.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 25, 2022
  • Latest release: Oct 30, 2023
  • Number of updates: 91
  • Update frequency: every 4.1 days
  • Top authors: superpayments (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /9,250 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 successfully, without throwing any errors or notices

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

Server-side resources used by Super Payments - WooCommerce Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.04 ▼1.84
Dashboard /wp-admin3.33 ▼0.0248.46 ▼22.41
Posts /wp-admin/edit.php3.38 ▲0.0246.42 ▼0.62
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.44 ▼22.16
Media Library /wp-admin/upload.php3.26 ▲0.0233.16 ▼4.99

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

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

Browser metrics Passed 4 tests

Super Payments - WooCommerce Payment Gateway: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.10 ▼0.251.76 ▲0.0341.41 ▼7.04
Dashboard /wp-admin2,199 ▲195.56 ▼0.0482.82 ▼6.2239.22 ▼3.43
Posts /wp-admin/edit.php2,107 ▲41.97 ▼0.0435.40 ▼6.1931.21 ▼6.71
Add New Post /wp-admin/post-new.php1,530 ▼523.65 ▲5.46746.47 ▲102.0458.92 ▼10.33
Media Library /wp-admin/upload.php1,404 ▲74.26 ▼0.05100.99 ▼3.3742.04 ▼0.80

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • woocommerce_gateway_order
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/super-payments/include/checkout.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-payments/include/marketing-assets.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/super-payments/include/order.php:108
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-payments/include/admin.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-payments/include/public-scripts.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-payments/include/api.php:76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-payments/include/events.php:77

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 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
3 plugin tags: woocommerce, super payments, super

super-payments/super-payments.php Passed 13 tests

The main PHP script in "Super Payments - WooCommerce Payment Gateway" version 1.16.1 is automatically included on every request by WordPress
89 characters long description:
Take payments on your store, eliminate payment fees and give your customers cash rewards.

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
Good job! No executable or dangerous file extensions detected1,325 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP112915111,290
CSS10025
JavaScript10010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity41.00
▷ Minimum class complexity5.00
▷ Maximum class complexity77.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods729.17%
▷ Public methods2395.83%
▷ Protected methods00.00%
▷ Private methods14.17%
Functions41
▷ Named functions3995.12%
▷ Anonymous functions24.88%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/superbuttonicon.png3.60KB2.01KB▼ 44.06%