84% stripe-gateway-for-events-manager-pro

Code Review | Stripe Gateway for Events Manager Pro

WordPress plugin Stripe Gateway for Events Manager Pro scored84%from 54 tests.

About plugin

  • Plugin page: stripe-gateway-fo...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7
  • WordPress version: 6.3.1
  • First release: Jun 29, 2015
  • Latest release: Apr 10, 2017
  • Number of updates: 25
  • Update frequency: every 31.3 days
  • Top authors: kirit-dholakiya (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /4,173 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼4.59ms] Passed 4 tests

An overview of server-side resources used by Stripe Gateway for Events Manager Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.36 ▼3.27
Dashboard /wp-admin3.31 ▼0.0345.46 ▼17.81
Posts /wp-admin/edit.php3.36 ▲0.0146.85 ▲3.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.83 ▲2.54
Media Library /wp-admin/upload.php3.24 ▲0.0134.41 ▲0.18

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Stripe Gateway for Events Manager Pro
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.54 ▼1.201.90 ▲0.1542.68 ▼0.34
Dashboard /wp-admin2,217 ▲264.88 ▼0.17109.01 ▲0.3341.71 ▲3.00
Posts /wp-admin/edit.php2,100 ▲112.01 ▲0.0140.16 ▲3.5938.43 ▼1.87
Add New Post /wp-admin/post-new.php1,541 ▲523.29 ▲0.11594.43 ▲14.5151.95 ▼4.46
Media Library /wp-admin/upload.php1,399 ▲84.25 ▲0.0396.91 ▼3.9142.80 ▼4.38

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 25× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/stripe-gateway-for-events-manager-pro/lib/Stripe/Transfer.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Error\\Base' not found in wp-content/plugins/stripe-gateway-for-events-manager-pro/lib/Stripe/Error/Card.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'EM_Gateway' not found in wp-content/plugins/stripe-gateway-for-events-manager-pro/gateway.stripe.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Error' not found in wp-content/plugins/stripe-gateway-for-events-manager-pro/lib/Stripe/ApiConnectionError.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/stripe-gateway-for-events-manager-pro/lib/Stripe/Customer.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Error' not found in wp-content/plugins/stripe-gateway-for-events-manager-pro/lib/Stripe/AuthenticationError.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Error\\Base' not found in wp-content/plugins/stripe-gateway-for-events-manager-pro/lib/Stripe/Error/InvalidRequest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/stripe-gateway-for-events-manager-pro/lib/Stripe/Coupon.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/stripe-gateway-for-events-manager-pro/lib/Stripe/Invoice.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/stripe-gateway-for-events-manager-pro/lib/Stripe/Token.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 26 tag instead of maximum 10
The official readme.txt is a good inspiration

stripe-gateway-for-events-manager-pro/main.php 92% from 13 tests

The principal PHP file in "Stripe Gateway for Events Manager Pro" v. 1.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("stripe-gateway-for-events-manager-pro.php" instead of "main.php")

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
Success! There were no dangerous files found in this plugin1,829 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP352962251,683
PO File26064146

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.58
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes32
▷ Abstract classes515.62%
▷ Concrete classes2784.38%
▷ Final classes00.00%
Methods140
▷ Static methods6042.86%
▷ Public methods12891.43%
▷ Protected methods53.57%
▷ Private methods75.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.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
There were not PNG files found in your plugin