84% fondy-woocommerce-payment-gateway

Code Review | Fondy — WooCommerce Payment Gateway

WordPress plugin Fondy — WooCommerce Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: fondy-woocommerce...
  • Plugin version: 3.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Oct 21, 2016
  • Latest release: Sep 6, 2022
  • Number of updates: 150
  • Update frequency: every 14.3 days
  • Top authors: fondyeu (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active /43,492 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.11ms] Passed 4 tests

Server-side resources used by Fondy — WooCommerce Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0244.33 ▼15.15
Dashboard /wp-admin3.37 ▲0.0251.57 ▼4.87
Posts /wp-admin/edit.php3.48 ▲0.0853.53 ▲1.08
Add New Post /wp-admin/post-new.php5.95 ▲0.0289.58 ▼14.94
Media Library /wp-admin/upload.php3.29 ▲0.0237.44 ▼1.49

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fondy — WooCommerce Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.192.00 ▲0.1245.93 ▲4.50
Dashboard /wp-admin2,195 ▲185.58 ▼0.2190.69 ▼3.6141.35 ▼6.73
Posts /wp-admin/edit.php2,100 ▼01.96 ▲0.0239.16 ▲4.1939.07 ▲1.69
Add New Post /wp-admin/post-new.php1,526 ▼023.08 ▼0.07665.71 ▼28.9462.97 ▲14.24
Media Library /wp-admin/upload.php1,403 ▼04.20 ▼0.08100.54 ▼18.8740.74 ▼9.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% 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 50% 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
The following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/fondy-woocommerce-payment-gateway/includes/abstract-wc-fondy-payment-gateway.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Fondy_Payment_Gateway' not found in wp-content/plugins/fondy-woocommerce-payment-gateway/includes/payment-methods/class-wc-gateway-fondy-card.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Fondy_Payment_Gateway' not found in wp-content/plugins/fondy-woocommerce-payment-gateway/includes/payment-methods/class-wc-gateway-fondy-localmethods.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Fondy_Payment_Gateway' not found in wp-content/plugins/fondy-woocommerce-payment-gateway/includes/payment-methods/class-wc-gateway-fondy-bank.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: You can take inspiration from this readme.txt

fondy-woocommerce-payment-gateway/fondy-woocommerce-payment-gateway.php 92% from 13 tests

"Fondy — WooCommerce Payment Gateway" version 3.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.5" instead of "3.0")

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
Everything looks great! No dangerous files found in this plugin1,561 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP122073071,122
SVG492172
PO File16390142
JavaScript300103
CSS34122

PHP code Passed 2 tests

This is a short overview 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.30
Average class complexity11.36
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits3
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods71
▷ Static methods1318.31%
▷ Public methods6997.18%
▷ Protected methods00.00%
▷ Private methods22.82%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants17
▷ Global constants529.41%
▷ Class constants1270.59%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon-128x128.png3.48KB2.26KB▼ 35.12%
assets/img/logo.png14.61KB8.22KB▼ 43.76%