77% events-manager-pro-securesubmit-gateway

Code Review | Events Manager Pro SecureSubmit Gateway

WordPress plugin Events Manager Pro SecureSubmit Gateway scored77%from 54 tests.

About plugin

  • Plugin page: events-manager-pr...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 5, 2014
  • Latest release: Feb 14, 2023
  • Number of updates: 18
  • Update frequency: every 173.3 days
  • Top authors: markhagan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /7,341 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
Installer ran successfully

Server metrics [RAM: ▼0.17MB] [CPU: ▼14.08ms] Passed 4 tests

An overview of server-side resources used by Events Manager Pro SecureSubmit Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.88 ▼2.56
Dashboard /wp-admin3.20 ▼0.1132.02 ▼19.80
Posts /wp-admin/edit.php3.26 ▼0.0933.81 ▼9.95
Add New Post /wp-admin/post-new.php5.44 ▼0.4570.23 ▼24.02
Media Library /wp-admin/upload.php3.20 ▼0.0329.79 ▼0.65

Server storage [IO: ▲0.54MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Events Manager Pro SecureSubmit Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.48 ▼0.081.92 ▲0.1236.93 ▼8.46
Dashboard /wp-admin2,206 ▲185.87 ▲1.00110.25 ▲6.5143.83 ▲0.59
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0336.93 ▲0.5035.02 ▲2.79
Add New Post /wp-admin/post-new.php1,540 ▲2023.26 ▲0.07645.31 ▼6.2449.54 ▼5.16
Media Library /wp-admin/upload.php1,388 ▼04.19 ▲0.0193.66 ▼1.4741.39 ▼0.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 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 0% 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/events-manager-pro-securesubmit-gateway/events-manager-securesubmit.php
  • 126× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HpsException' not found in wp-content/plugins/events-manager-pro-securesubmit-gateway/hps/src/Infrastructure/HpsCheckException.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsBuilderAbstract' not found in wp-content/plugins/events-manager-pro-securesubmit-gateway/hps/src/Services/Fluent/Gateway/GiftCard/HpsGiftCardServiceSaleBuilder.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'HpsException' not found in wp-content/plugins/events-manager-pro-securesubmit-gateway/hps/src/Infrastructure/HpsCreditException.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsAuthorization' not found in wp-content/plugins/events-manager-pro-securesubmit-gateway/hps/src/Entities/Debit/HpsDebitReturn.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'EM_Gateway' not found in wp-content/plugins/events-manager-pro-securesubmit-gateway/class-events-manager-securesubmit.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'HpsAltPaymentService' not found in wp-content/plugins/events-manager-pro-securesubmit-gateway/hps/src/Services/Gateway/AltPayment/HpsPayPalService.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsAuthorization' not found in wp-content/plugins/events-manager-pro-securesubmit-gateway/hps/src/Entities/Credit/HpsRecurringBilling.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsPayPlanResourceAbstract' not found in wp-content/plugins/events-manager-pro-securesubmit-gateway/hps/src/Entities/PayPlan/HpsPayPlanPaymentMethod.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HpsBuilderAbstract' not found in wp-content/plugins/events-manager-pro-securesubmit-gateway/hps/src/Services/Fluent/Gateway/Check/HpsCheckServiceSaleBuilder.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'HpsAuthorization' not found in wp-content/plugins/events-manager-pro-securesubmit-gateway/hps/src/Entities/AltPayment/HpsAltPaymentAddToBatch.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (The SecureSubmit Plugin Configuration Screen.), #2 (A view of the plugin in action.)
  • Tags: Please delete some tags, you are using 24 tag instead of maximum 10
The official readme.txt might help

events-manager-pro-securesubmit-gateway/events-manager-securesubmit.php 85% from 13 tests

The main file in "Events Manager Pro SecureSubmit Gateway" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("events-manager-pro-securesubmit-gateway.php" instead of "events-manager-securesubmit.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected9,004 lines of code in 196 files:
LanguageFilesBlank linesComment linesLines of code
PHP1921,6502,8738,522
Markdown3750272
JavaScript14920210

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.73
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces5
Traits0
Classes183
▷ Abstract classes2111.48%
▷ Concrete classes16288.52%
▷ Final classes00.00%
Methods533
▷ Static methods6612.38%
▷ Public methods37570.36%
▷ Protected methods9517.82%
▷ Private methods6311.82%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants173
▷ Global constants31.73%
▷ Class constants17098.27%
▷ Public constants170100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png31.34KB11.88KB▼ 62.09%
assets/icon-128x128.png13.52KB5.25KB▼ 61.14%