89% gastcoin-gateway

Code Review | Gastcoin Gateway

WordPress plugin Gastcoin Gateway scored89%from 54 tests.

About plugin

  • Plugin page: gastcoin-gateway
  • Plugin version: 1.9.17
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 15, 2021
  • Latest release: Feb 21, 2023
  • Number of updates: 73
  • Update frequency: every 6.8 days
  • Top authors: femorapro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /8,384 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.42ms] Passed 4 tests

Analyzing server-side resources used by Gastcoin Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.89 ▼2.42
Dashboard /wp-admin3.35 ▲0.0156.46 ▼11.40
Posts /wp-admin/edit.php3.47 ▲0.1152.38 ▲2.69
Add New Post /wp-admin/post-new.php5.93 ▲0.0585.90 ▼16.62
Media Library /wp-admin/upload.php3.26 ▲0.0339.47 ▲0.76

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Gastcoin Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,065 ▲30414.95 ▲0.319.38 ▲7.6853.42 ▲10.95
Dashboard /wp-admin2,353 ▲1766.22 ▲0.53112.48 ▲16.3042.84 ▲2.39
Posts /wp-admin/edit.php2,287 ▲1873.36 ▲1.3751.48 ▲10.3133.04 ▼4.01
Add New Post /wp-admin/post-new.php1,548 ▲1123.47 ▲5.29657.29 ▲3.1837.24 ▼37.64
Media Library /wp-admin/upload.php1,424 ▲214.08 ▼0.1082.39 ▼13.5340.74 ▼6.04

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

gastcoin-gateway/gastcoin.php 85% from 13 tests

The primary PHP file in "Gastcoin Gateway" version 1.9.17 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gastcoin-gateway.php" instead of "gastcoin.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, 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 not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,325 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP142566311,162
JavaScript597110747
CSS3379315
PO File14048101

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods46
▷ Static methods24.35%
▷ Public methods4189.13%
▷ Protected methods00.00%
▷ Private methods510.87%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
32 PNG files occupy 0.18MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/card-gastcoin.png36.06KB16.86KB▼ 53.26%
assets/img/usdt.png2.78KB1.52KB▼ 45.38%
assets/img/512x512.png18.65KB11.92KB▼ 36.09%
assets/img/ico-alert.png1.13KB0.57KB▼ 49.35%
assets/img/coinbasewallet.png23.20KB13.46KB▼ 42.00%