77% rocketfuel-payment-gateway

Code Review | RocketFuel - RocketFuel Payment Method for Woocommerce

WordPress plugin RocketFuel - RocketFuel Payment Method for Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: rocketfuel-paymen...
  • Plugin version: 3.2.1.32
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 16, 2021
  • Latest release: Oct 27, 2023
  • Number of updates: 132
  • Update frequency: every 5.4 days
  • Top authors: rockectfuel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,768 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by RocketFuel - RocketFuel Payment Method for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.95 ▼2.04
Dashboard /wp-admin3.31 ▲0.0144.17 ▼3.96
Posts /wp-admin/edit.php3.37 ▲0.0041.30 ▼3.85
Add New Post /wp-admin/post-new.php5.90 ▲0.0078.11 ▼11.02
Media Library /wp-admin/upload.php3.24 ▲0.0036.83 ▲4.44

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for RocketFuel - RocketFuel Payment Method for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.35 ▼0.201.63 ▲0.1937.22 ▼2.42
Dashboard /wp-admin2,202 ▲215.57 ▼0.1480.41 ▼17.6837.96 ▼4.81
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0134.73 ▼1.3236.05 ▼1.31
Add New Post /wp-admin/post-new.php1,535 ▲723.11 ▼0.02667.31 ▲20.3264.78 ▲9.99
Media Library /wp-admin/upload.php1,410 ▲74.23 ▼0.02106.58 ▲5.1846.99 ▲2.07

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 did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/rocketfuel-payment-gateway/rocketfuel-woo-gateway.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/rocketfuel-payment-gateway/Controllers/Rocketfuel_Gateway_Controller.php:7

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 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
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (banner-1544x500.png), #2 (icon-128x128.png)
The official readme.txt is a good inspiration

rocketfuel-payment-gateway/rocketfuel-woo-gateway.php 77% from 13 tests

The main PHP file in "RocketFuel - RocketFuel Payment Method for Woocommerce" ver. 3.2.1.32 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("/Languages/")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.8" instead of "3.0.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rocketfuel-payment-gateway.php" instead of "rocketfuel-woo-gateway.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
There were no executable files found in this plugin6,146 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP236637422,544
JSON2002,252
JavaScript44051631,049
CSS2646272
SVG20229

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity21.56
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods124
▷ Static methods7963.71%
▷ Public methods11794.35%
▷ Protected methods21.61%
▷ Private methods54.03%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo.png0.64KB0.40KB▼ 37.75%