78% woo-sofortuberweisung-gateway

Code Review | Sofortueberweisung Gateway for Woocommerce

WordPress plugin Sofortueberweisung Gateway for Woocommerce scored 78% from 54 tests.

About plugin

  • Plugin page: woo-sofortuberwei...
  • Plugin version: 1.3.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2018
  • Latest release: Oct 25, 2020
  • Number of updates: 81
  • Update frequency: every 10.8 days
  • Top authors: mlfactory (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active / 11,679 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.88ms] Passed 4 tests

Analyzing server-side resources used by Sofortueberweisung Gateway for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.96 ▼9.66
Dashboard /wp-admin3.40 ▲0.1049.20 ▲3.51
Posts /wp-admin/edit.php3.45 ▲0.0944.46 ▼5.15
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.94 ▼14.64
Media Library /wp-admin/upload.php3.32 ▲0.0937.45 ▲1.92

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Sofortueberweisung Gateway for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.275.78 ▲3.5845.12 ▲3.05
Dashboard /wp-admin2,209 ▲215.85 ▲0.04100.97 ▼1.4437.62 ▼7.66
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0333.42 ▼6.9136.47 ▲1.15
Add New Post /wp-admin/post-new.php1,533 ▼123.15 ▲0.02660.70 ▲13.1555.80 ▼0.84
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0498.47 ▼8.9342.36 ▼9.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-sofortuberweisung-gateway/sofort/examples/example.transaction.php
    • > /wp-content/plugins/woo-sofortuberweisung-gateway/sofort/examples/example.sofortueberweisung.php
  • 46× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/woo-sofortuberweisung-gateway/sofort/examples/example.transaction.php on line 73
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/woo-sofortuberweisung-gateway/sofort/examples/example.transaction.php on line 73
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/woo-sofortuberweisung-gateway/sofort/examples/example.transaction.php on line 73
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/woo-sofortuberweisung-gateway/sofort/examples/example.transaction.php on line 73
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/woo-sofortuberweisung-gateway/sofort/examples/example.transaction.php on line 73
    • > PHP Fatal error
      Uncaught Error: Class 'SofortLibTest' not found in wp-content/plugins/woo-sofortuberweisung-gateway/sofort/unittests/xmlToArrayTest.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'SofortElement' not found in wp-content/plugins/woo-sofortuberweisung-gateway/sofort/core/lib/elements/sofortText.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'SofortLibTest' not found in wp-content/plugins/woo-sofortuberweisung-gateway/sofort/unittests/xmlToArrayNodeTest.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-sofortuberweisung-gateway/sofort/unittests/fileLoggerTest.php:4
    • > PHP Fatal error
      Cannot use 'Object' as class name as it is reserved in wp-content/plugins/woo-sofortuberweisung-gateway/sofort/unittests/SofortObject.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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:
  • Requires at least: Version format is invalid
You can take inspiration from this readme.txt

woo-sofortuberweisung-gateway/woo-sofortuberweisung-gateway.php Passed 13 tests

The main PHP file in "Sofortueberweisung Gateway for Woocommerce" ver. 1.3.4 adds more information about the plugin and also serves as the entry point for this plugin
72 characters long description:
Sofortueberweisung / Klarna Gateway for WooCommerce, easy, fast and safe

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected8,008 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,4002,1776,535
PO File64145161,422
XML10025
SVG10014
JSON1008
Markdown1004

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.15
Average class complexity8.71
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes41
▷ Abstract classes614.63%
▷ Concrete classes3585.37%
▷ Final classes00.00%
Methods416
▷ Static methods71.68%
▷ Public methods37890.87%
▷ Protected methods163.85%
▷ Private methods225.29%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
core/sofort-logo.png10.71KB5.49KB▼ 48.79%