83% fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce

Code Review | Fiizy Pay Later Multi-lender Payment Gateway for WooCommerce

WordPress plugin Fiizy Pay Later Multi-lender Payment Gateway for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: fiizy-pay-later-m...
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 22, 2022
  • Latest release: Nov 24, 2022
  • Number of updates: 8
  • Update frequency: every 27.3 days
  • Top authors: fiizy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 335 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.04MB] [CPU: ▼12.33ms] Passed 4 tests

This is a short check of server-side resources used by Fiizy Pay Later Multi-lender Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.75 ▼1.52
Dashboard /wp-admin3.33 ▲0.0334.33 ▼18.04
Posts /wp-admin/edit.php3.40 ▲0.0439.96 ▼4.63
Add New Post /wp-admin/post-new.php5.57 ▼0.3279.63 ▼22.26
Media Library /wp-admin/upload.php3.33 ▲0.1130.58 ▼4.40

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 141 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
woocommerce_fiizy_settings
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Fiizy Pay Later Multi-lender Payment Gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.60 ▼0.644.38 ▲2.1840.81 ▼11.35
Dashboard /wp-admin2,213 ▲225.86 ▼0.04107.01 ▲5.4140.03 ▲0.44
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0239.12 ▼1.3338.97 ▲5.96
Add New Post /wp-admin/post-new.php1,551 ▲1418.15 ▼4.95589.63 ▼84.5765.48 ▲9.04
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0698.22 ▼17.2542.45 ▼9.15

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 30× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce/templates/hook/pay-with-fiizy.php:1
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\SimpleCache\\CacheException' not found in wp-content/plugins/fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce/vendor/psr/simple-cache/src/InvalidArgumentException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce/vendor/psr/log/Psr/Log/AbstractLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Fiizy\\Serializer\\SerializerInterface' not found in wp-content/plugins/fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce/vendor/fiizy/fiizy-api-sdk/src/Serializer/SimpleSerializer.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Fiizy\\Serializer\ormalizer\ormalizerInterface' not found in wp-content/plugins/fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce/vendor/fiizy/fiizy-api-sdk/src/Serializer/Normalizer/ObjectNormalizer.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce/src/Gateway.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce/src/Logger.php:39
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\SimpleCache\\CacheInterface' not found in wp-content/plugins/fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce/src/Util/Cache.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: payments, fiizy, woocommerce

fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce/woocommerce-fiizy.php 77% from 13 tests

This is the main PHP file of "Fiizy Pay Later Multi-lender Payment Gateway for WooCommerce" version 1.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fiizy-pay-later-multi-lender-payment-gateway-for-woocommerce.php" instead of "woocommerce-fiizy.php")
  • Description: The description should be shorter than 140 characters (currently 239 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected5,740 lines of code in 130 files:
LanguageFilesBlank linesComment linesLines of code
PHP1141,2824,5054,883
JSON600407
Markdown7730239
PO File16581177
SVG20134

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces23
Interfaces21
Traits2
Classes80
▷ Abstract classes67.50%
▷ Concrete classes7492.50%
▷ Final classes79.46%
Methods431
▷ Static methods419.51%
▷ Public methods37486.77%
▷ Protected methods4510.44%
▷ Private methods122.78%
Functions12
▷ Named functions325.00%
▷ Anonymous functions975.00%
Constants73
▷ Global constants68.22%
▷ Class constants6791.78%
▷ Public constants67100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/fiizy_payment_method_icon.png0.35KB0.26KB▼ 25.14%
assets/images/fiizy_payment_method.png1.24KB0.88KB▼ 29.62%