84% greenpay-payment-gateway

Code Review | Greenpay Payment Gateway

WordPress plugin Greenpay Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: greenpay-payment-...
  • Plugin version: 3.3.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3.1
  • WordPress version: 6.3.1
  • First release: May 9, 2019
  • Latest release: Nov 20, 2023
  • Number of updates: 55
  • Update frequency: every 30.8 days
  • Top authors: appsmanager (89.09%)aramirezgp (10.91%)keylorcr (3.64%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /6,047 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by Greenpay Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0335.76 ▼7.76
Dashboard /wp-admin3.34 ▲0.0347.99 ▼4.23
Posts /wp-admin/edit.php3.39 ▲0.0349.01 ▼0.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.58 ▼5.42
Media Library /wp-admin/upload.php3.26 ▲0.0334.53 ▼1.82

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Greenpay Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲1014.27 ▼0.441.54 ▼0.3936.73 ▼6.74
Dashboard /wp-admin2,202 ▲245.58 ▼0.1494.49 ▼18.9342.92 ▼3.90
Posts /wp-admin/edit.php2,110 ▲102.01 ▲0.0739.94 ▲1.8137.48 ▲5.11
Add New Post /wp-admin/post-new.php1,536 ▲1023.52 ▲0.43600.48 ▼43.8252.48 ▼6.50
Media Library /wp-admin/upload.php1,404 ▲14.29 ▲0.1397.93 ▼0.8144.59 ▼1.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/greenpay-payment-gateway/includes/greenpay-misc.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/greenpay-payment-gateway/includes/admin/token_migration-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: The official readme.txt might help

greenpay-payment-gateway/greenpay-payment-gateway.php Passed 13 tests

Analyzing the main PHP file in "Greenpay Payment Gateway" version 3.3.6
48 characters long description:
Take card payments on your store using Greenpay.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin24,385 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JSON30019,374
PHP185611,0213,201
PO File24485701,126
JavaScript37047374
Markdown1530124
CSS3241108
SVG70363
XML14215

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity34.08
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods125
▷ Static methods118.80%
▷ Public methods11894.40%
▷ Protected methods00.00%
▷ Private methods75.60%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants1090.91%
▷ Class constants19.09%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.54MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-1.png121.92KB35.86KB▼ 70.59%
assets/images/tasa-cero.png28.56KB28.59KB0.00%
assets/images/screenshot-2.png101.07KB32.43KB▼ 67.91%
assets/images/screenshot-4.png103.86KB34.03KB▼ 67.24%
assets/images/icon-256x256.png5.64KB4.05KB▼ 28.19%