90% stonehenge-em-gateway-selector

Code Review | Events Manager Pro - Payment Gateway Selector

WordPress plugin Events Manager Pro - Payment Gateway Selector scored90%from 54 tests.

About plugin

  • Plugin page: stonehenge-em-gat...
  • Plugin version: 2.0.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Aug 12, 2018
  • Latest release: Mar 6, 2022
  • Number of updates: 34
  • Update frequency: every 38.3 days
  • Top authors: DuisterDenHaag (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,233 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.84ms] Passed 4 tests

Analyzing server-side resources used by Events Manager Pro - Payment Gateway Selector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.90 ▼1.45
Dashboard /wp-admin3.33 ▼0.0157.92 ▼5.71
Posts /wp-admin/edit.php3.39 ▲0.0347.71 ▲1.22
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.56 ▼15.83
Media Library /wp-admin/upload.php3.26 ▲0.0333.51 ▼0.36

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

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

Browser metrics Passed 4 tests

Events Manager Pro - Payment Gateway Selector: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.24 ▼0.111.68 ▲0.0343.35 ▼0.04
Dashboard /wp-admin2,195 ▲245.57 ▼0.0489.47 ▼9.6540.00 ▼6.65
Posts /wp-admin/edit.php2,100 ▼01.95 ▲0.0135.03 ▲0.6933.97 ▼3.10
Add New Post /wp-admin/post-new.php1,541 ▲1522.89 ▲0.04675.99 ▲9.6865.85 ▲6.35
Media Library /wp-admin/upload.php1,394 ▼64.25 ▲0.0294.86 ▼11.6740.67 ▼5.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: events manager, gateway, payment, mollie

stonehenge-em-gateway-selector/stonehenge-em-gateway-selector.php Passed 13 tests

The principal PHP file in "Events Manager Pro - Payment Gateway Selector" v. 2.0.4 is loaded by WordPress automatically on each request
105 characters long description:
Easily set or unset your activated payment gateway(s) per individual single event with a simple checkbox.

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
Success! There were no dangerous files found in this plugin165 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22877107
PO File1131358

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity4.57
▷ Minimum method complexity2.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin