83% manual-payment-gateway-rocket

Code Review | Rocket Manual Payment Gateway

WordPress plugin Rocket Manual Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: manual-payment-ga...
  • Plugin version: 1.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Nov 17, 2020
  • Latest release: Aug 19, 2021
  • Number of updates: 8
  • Update frequency: every 34.4 days
  • Top authors: zitengine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /686 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Rocket Manual Payment Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0047.93 ▲4.08
Dashboard /wp-admin3.31 ▲0.0043.60 ▼7.24
Posts /wp-admin/edit.php3.36 ▲0.0051.24 ▲3.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.69 ▼13.06
Media Library /wp-admin/upload.php3.23 ▲0.0034.80 ▼1.89

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Rocket Manual Payment Gateway: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.24 ▼1.061.71 ▼0.3347.58 ▼0.48
Dashboard /wp-admin2,206 ▲155.77 ▼0.12107.16 ▲2.7847.74 ▲0.22
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0146.36 ▲7.4739.22 ▲0.41
Add New Post /wp-admin/post-new.php1,514 ▼1917.75 ▼5.47673.52 ▲1.2049.84 ▼1.37
Media Library /wp-admin/upload.php1,385 ▲34.20 ▲0.00100.59 ▲1.9541.69 ▼0.27

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/manual-payment-gateway-rocket/rocket.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% 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
Please fix the following attributes: The official readme.txt might help

manual-payment-gateway-rocket/rocket.php 69% from 13 tests

This is the main PHP file of "Rocket Manual Payment Gateway" version 1.1, 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:
  • Main file name: Name the main plugin file the same as the plugin slug ("manual-payment-gateway-rocket.php" instead of "rocket.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 356 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin302 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28063297
JavaScript1005

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
images/rocket.png3.11KB1.89KB▼ 39.35%