84% rapidcents-payment-gateway

Code Review | Rapidcents Payment Gateway

WordPress plugin Rapidcents Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: rapidcents-paymen...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5
  • WordPress version: 6.3.1
  • First release: Feb 21, 2021
  • Latest release: Feb 22, 2021
  • Number of updates: 2
  • Update frequency: every 29.5 days
  • Top authors: manirahnama (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /308 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.81ms] Passed 4 tests

An overview of server-side resources used by Rapidcents Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.83 ▼5.75
Dashboard /wp-admin3.39 ▲0.0849.64 ▼5.06
Posts /wp-admin/edit.php3.44 ▲0.0854.99 ▼2.07
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.63 ▼10.36
Media Library /wp-admin/upload.php3.31 ▲0.0835.17 ▼2.05

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Rapidcents Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.25 ▼0.111.76 ▲0.0142.56 ▼0.88
Dashboard /wp-admin2,205 ▲255.58 ▼0.0386.54 ▼15.4040.88 ▼3.57
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0540.60 ▲3.7741.08 ▲1.29
Add New Post /wp-admin/post-new.php1,535 ▲723.07 ▲0.12635.19 ▼48.9650.15 ▼5.07
Media Library /wp-admin/upload.php1,404 ▲44.17 ▲0.00101.34 ▼16.1645.23 ▼3.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/rapidcents-payment-gateway/rapidcents.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can take inspiration from this readme.txt

rapidcents-payment-gateway/rapidcents.php 92% from 13 tests

The primary PHP file in "Rapidcents Payment Gateway" version 1.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("rapidcents-payment-gateway.php" instead of "rapidcents.php")

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
No dangerous file extensions were detected1,232 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP18863434
JavaScript279395
CSS2341248
Sass1281136
SVG190019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants7
▷ Global constants7100.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
PNG images were not found in this plugin