10% reepay-checkout-gateway

Code Review | Official Billwerk+ Payments Gateway

WordPress plugin Official Billwerk+ Payments Gateway scored10%from 54 tests.

About plugin

  • Plugin page: reepay-checkout-g...
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 23, 2019
  • Latest release: Sep 6, 2023
  • Number of updates: 115
  • Update frequency: every 14.7 days
  • Top authors: reepaydenmark (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active /21,843 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/reepay-checkout-gateway/includes/LoggingTrait.php+23
    Uncaught Error: Call to undefined function Reepay\Checkout\wc_get_logger() in wp-content/plugins/reepay-checkout-gateway/includes/LoggingTrait.php:23
    Stack trace:
    #0 wp-content/plugins/reepay-checkout-gateway/includes/Plugin/Statistics.php(82): Reepay\Checkout\Plugin\Statistics->log()
    #1 wp-content/plugins/reepay-checkout-gateway/includes/Plugin/Statistics.php(137): Reepay\Checkout\Plugin\Statistics->send_event()
    #2 wp-includes/class-wp-hook.php(310): Reepay\Checkout\Plugin\Statistics::private_key_activated()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/includes/plugin.php(693): do_action()

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

A check of server-side resources used by Official Billwerk+ Payments Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.23 ▼1.89
Dashboard /wp-admin3.31 ▲0.0048.51 ▼3.44
Posts /wp-admin/edit.php3.36 ▲0.0050.84 ▲2.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.10 ▼10.76
Media Library /wp-admin/upload.php3.23 ▲0.0036.91 ▼1.76

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Official Billwerk+ Payments Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.19 ▼0.341.62 ▼0.0841.03 ▲1.63
Dashboard /wp-admin2,195 ▲185.61 ▼0.0085.95 ▼3.7239.07 ▼5.61
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0539.02 ▲2.1034.57 ▼4.45
Add New Post /wp-admin/post-new.php1,526 ▼022.98 ▼0.03659.74 ▼21.8060.45 ▼3.18
Media Library /wp-admin/upload.php1,400 ▲34.27 ▲0.09100.28 ▼0.7642.53 ▼0.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Error in wp-content/plugins/reepay-checkout-gateway/includes/LoggingTrait.php+23
    Uncaught Error: Call to undefined function Reepay\Checkout\wc_get_logger() in wp-content/plugins/reepay-checkout-gateway/includes/LoggingTrait.php:23
    Stack trace:
    #0 wp-content/plugins/reepay-checkout-gateway/includes/Plugin/Statistics.php(82): Reepay\Checkout\Plugin\Statistics->log()
    #1 wp-content/plugins/reepay-checkout-gateway/includes/Plugin/Statistics.php(130): Reepay\Checkout\Plugin\Statistics->send_event()
    #2 wp-includes/class-wp-hook.php(310): Reepay\Checkout\Plugin\Statistics::plugin_deleted()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/includes/plugin.php(1269): do_action()
    #6 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • Uninstaller has failed for this plugin, leaving 299 files (3.02MB) in the plugin directory
    • (new file) .phpcs.xml.dist
    • (new file) Readme.txt
    • (new file) assets/css/admin.scss
    • (new file) .editorconfig
    • (new file) assets/css/style.css
    • (new file) .travis.yml
    • (new file) assets/css/checkout.scss
    • (new file) README.md
    • (new file) assets/css/style.css.map
    • (new file) assets/css/style.min.css
    • ...
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/reepay-checkout-gateway/tests/bootstrap.php
    • > /wp-content/plugins/reepay-checkout-gateway/tests/unit/bootstrap.php
    • > /wp-content/plugins/reepay-checkout-gateway/bin/set-php-temp-path.php
  • 34× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/reepay-checkout-gateway/tests/helpers/Reepay_UnitTestCase.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reepay-checkout-gateway/includes/class-wc-gateway-reepay-capture.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/reepay-checkout-gateway/tests/functions/CurrencyTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Reepay\\Checkout\\Tests\\Helpers\\Reepay_UnitTestCase' not found in wp-content/plugins/reepay-checkout-gateway/tests/unit/functions/FormatTest.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/reepay-checkout-gateway/includes/class-wc-reepay-order-statuses.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/reepay-checkout-gateway/tests/functions/SubscriptionsTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Reepay\\Checkout\\Tests\\Helpers\\Reepay_UnitTestCase' not found in wp-content/plugins/reepay-checkout-gateway/tests/unit/orderFlow/InstantSettleTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Reepay\\Checkout\\OrderFlow\\OrderCapture' not found in wp-content/plugins/reepay-checkout-gateway/tests/mocks/OrderFlow/OrderCaptureMock.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/reepay-checkout-gateway/tests/ApiConfiguredTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Reepay\\Checkout\\Tests\\Helpers\\Reepay_UnitTestCase' not found in wp-content/plugins/reepay-checkout-gateway/tests/unit/functions/CurrencyTest.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed: The official readme.txt might help

reepay-checkout-gateway/reepay-woocommerce-payment.php 77% from 13 tests

"Official Billwerk+ Payments Gateway" version 1.5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.0.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("reepay-checkout-gateway.php" instead of "reepay-woocommerce-payment.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected33,601 lines of code in 251 files:
LanguageFilesBlank linesComment linesLines of code
PHP1704,4387,43718,488
JSON5009,418
JavaScript192031113,561
SVG2948598
SQL183153341
CSS104511315
Bourne Shell66835306
Sass4462252
PO File16781163
XML3141276
YAML17064
Markdown211019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity18.89
▷ Minimum class complexity1.00
▷ Maximum class complexity219.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces16
Interfaces4
Traits5
Classes122
▷ Abstract classes97.38%
▷ Concrete classes11392.62%
▷ Final classes21.77%
Methods803
▷ Static methods12916.06%
▷ Public methods76094.65%
▷ Protected methods172.12%
▷ Private methods263.24%
Functions69
▷ Named functions4260.87%
▷ Anonymous functions2739.13%
Constants40
▷ Global constants615.00%
▷ Class constants3485.00%
▷ Public constants34100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
28 PNG files occupy 0.16MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/visa.png4.94KB2.47KB▼ 49.96%
assets/images/cup.png10.32KB4.62KB▼ 55.26%
assets/images/mc.png4.64KB2.34KB▼ 49.48%
assets/images/discover.png4.06KB1.98KB▼ 51.22%
assets/images/mobilepay.png4.98KB2.50KB▼ 49.74%