10% myuserpay

Code Review | MyUser Payments

WordPress plugin MyUser Payments scored10%from 54 tests.

About plugin

  • Plugin page: myuserpay
  • Plugin version: 3.0.0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.6
  • WordPress version: 6.3.1
  • First release: Jan 29, 2021
  • Latest release: Mar 14, 2023
  • Number of updates: 94
  • Update frequency: every 8.2 days
  • Top authors: myuserhq (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /2,409 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/myuserpay/index.php+15
    Constant WP_DEBUG already defined

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.31ms] Passed 4 tests

An overview of server-side resources used by MyUser Payments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.02 ▼1.443.85 ▼48.36
Dashboard /wp-admin2.05 ▼1.264.68 ▼45.57
Posts /wp-admin/edit.php2.05 ▼1.315.83 ▼41.26
Add New Post /wp-admin/post-new.php2.05 ▼3.845.68 ▼86.04
Media Library /wp-admin/upload.php2.05 ▼1.185.11 ▼32.92

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for MyUser Payments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.021.43 ▼0.4537.38 ▼7.62
Dashboard /wp-admin2,195 ▲185.64 ▲0.0496.25 ▼5.1541.48 ▼1.03
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.1338.86 ▲3.7935.92 ▲0.44
Add New Post /wp-admin/post-new.php1,526 ▼923.16 ▲4.85671.86 ▲4.2158.37 ▼12.47
Media Library /wp-admin/upload.php1,400 ▼04.26 ▲0.07100.07 ▼0.7540.08 ▼7.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/myuserpay/index.php+15
    Constant WP_DEBUG already defined
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/myuserpay/index.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/myuserpay/classes/WC_Gateway_MyUserPayment.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/myuserpay/classes/MUP_WC_Gateway_WPressPlugin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (WooCommerce > Payment Gateway > MyUser Payments - setting page), #2 (Checkout Page - Option of Payment by *MyUser Payments*), #3 (MyUser Payments - Client login page), #4 (MyUser Payments - Payment slection page), #5 (MyUser Payments - Payment processing page), #6 (Return Page - Transaction status as per *MyUser Payments* display on return page as per setting)
You can look at the official readme.txt

myuserpay/index.php 92% from 13 tests

The main file in "MyUser Payments" v. 3.0.0.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("myuserpay.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin2,174 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP74535912,174

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.33
Average class complexity46.50
▷ Minimum class complexity7.00
▷ Maximum class complexity100.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods52
▷ Static methods1630.77%
▷ Public methods52100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions1995.00%
▷ Anonymous functions15.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.36MB with 0.22MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/myuser_payment_gateway.png363.72KB142.46KB▼ 60.83%