83% rave-payment-forms

Code Review | Flutterwave Payments

WordPress plugin Flutterwave Payments scored 83% from 54 tests.

About plugin

  • Plugin page: rave-payment-forms
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Apr 23, 2018
  • Latest release: Sep 13, 2023
  • Number of updates: 29
  • Update frequency: every 68.4 days
  • Top authors: flutterwave (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 22,429 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲0.66ms] Passed 4 tests

Server-side resources used by Flutterwave Payments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1438.65 ▼1.38
Dashboard /wp-admin3.44 ▲0.1444.91 ▼4.83
Posts /wp-admin/edit.php3.49 ▲0.1349.42 ▲7.42
Add New Post /wp-admin/post-new.php5.97 ▲0.0897.64 ▲1.43
Media Library /wp-admin/upload.php3.30 ▲0.0740.23 ▲10.51
Settings /wp-admin/admin.php?page=flutterwave-payments3.3629.70
Transactions /wp-admin/admin.php?page=flutterwave-payments-transactions3.2930.16

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 58 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
flw_rave_options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Flutterwave Payments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲9313.20 ▼1.221.68 ▼0.1939.69 ▼4.57
Dashboard /wp-admin2,251 ▲665.84 ▲0.9897.41 ▼15.1869.35 ▲25.86
Posts /wp-admin/edit.php2,136 ▲472.02 ▲0.0140.22 ▲3.7337.26 ▼1.45
Add New Post /wp-admin/post-new.php1,712 ▲19822.36 ▲4.79726.12 ▲113.4649.54 ▼2.75
Media Library /wp-admin/upload.php1,430 ▲424.25 ▲0.1497.07 ▲0.5173.02 ▲30.87
Settings /wp-admin/admin.php?page=flutterwave-payments1,3612.1623.0843.41
Transactions /wp-admin/admin.php?page=flutterwave-payments-transactions9752.0524.7126.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • flw_rave_options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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 no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/rave-payment-forms/includes/api/class-flw-webhook-rest-route.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Flutterwave\\WordPress\\Integrations\\AbstractService' not found in wp-content/plugins/rave-payment-forms/src/Integrations/ApiLayer/class-exchangerateservice.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Abstract_FLW_Shortcode' not found in wp-content/plugins/rave-payment-forms/includes/shortcodes/class-flw-shortcode-donation-form.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'FLW_Payment_List' not found in wp-content/plugins/rave-payment-forms/views/payment-list-table.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/rave-payment-forms/includes/api/class-flw-transaction-rest-route.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #6, #7 in rave-payment-forms/assets to your readme.txt
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

rave-payment-forms/rave-payment-forms.php 85% from 13 tests

This is the main PHP file of "Flutterwave Payments" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "5.2")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("i18n/languages")

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
Success! There were no dangerous files found in this plugin3,329 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP265611,3242,350
CSS31409535
JavaScript94540300
Markdown1620126
SVG40013
Sass1105

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.65
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes20
▷ Abstract classes210.00%
▷ Concrete classes1890.00%
▷ Final classes950.00%
Methods150
▷ Static methods3322.00%
▷ Public methods10066.67%
▷ Protected methods1912.67%
▷ Private methods3120.67%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants13
▷ Global constants646.15%
▷ Class constants753.85%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/flw-lock4.png0.21KB0.17KB▼ 19.91%
assets/images/flutterwave-icon.png0.37KB0.27KB▼ 28.98%
assets/images/flutterwave.png46.14KB10.42KB▼ 77.42%
assets/images/flw-lock.png0.24KB0.22KB▼ 6.94%
assets/images/rave-icon.png0.51KB0.40KB▼ 21.48%