68% event-agent

Code Review | EventAgent.ai

WordPress plugin EventAgent.ai scored68%from 54 tests.

About plugin

  • Plugin page: event-agent
  • Plugin version: 4.3.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 10, 2020
  • Latest release: Oct 9, 2023
  • Number of updates: 320
  • Update frequency: every 3.9 days
  • Top authors: aldeng (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

10+ active /5,653 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.15ms] Passed 4 tests

An overview of server-side resources used by EventAgent.ai
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.01 ▼3.85
Dashboard /wp-admin3.37 ▲0.0744.74 ▼6.70
Posts /wp-admin/edit.php3.43 ▲0.0746.34 ▲1.97
Add New Post /wp-admin/post-new.php5.96 ▲0.0783.55 ▼9.19
Media Library /wp-admin/upload.php3.29 ▲0.0634.36 ▼0.84
Events /wp-admin/admin.php?page=ea-events3.4634.54
Venues /wp-admin/admin.php?page=ea-venues3.3429.28
Speakers /wp-admin/admin.php?page=ea-speakers3.3331.27
Carousels /wp-admin/admin.php?page=ea-carousels3.3331.58
Forms /wp-admin/admin.php?page=ea-forms3.3431.31
Customers /wp-admin/admin.php?page=ea-customers3.3330.39
Coupons /wp-admin/admin.php?page=ea-coupons3.3231.43
Registrations /wp-admin/admin.php?page=ea-registrations3.4126.45
Categories /wp-admin/admin.php?page=ea-categories3.3330.58

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 258 new files
Database: no new tables, 10 new options
New WordPress options
EVENT_AGENT_ADMIN_KEY
widget_recent-posts
EVENT_AGENT_PUBLIC_KEY
EVENT_AGENT_URL
EVENT_AGENT_CONFIG_KEY
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for EventAgent.ai
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲14314.35 ▲0.001.98 ▲0.3041.84 ▲3.32
Dashboard /wp-admin2,288 ▲1145.62 ▼0.0182.90 ▼5.4237.38 ▼6.13
Posts /wp-admin/edit.php2,190 ▲901.97 ▼0.0535.35 ▲1.6732.62 ▼5.28
Add New Post /wp-admin/post-new.php1,602 ▲7623.43 ▼0.31648.60 ▼26.9853.68 ▼6.76
Media Library /wp-admin/upload.php1,490 ▲934.21 ▼0.0891.77 ▼7.5841.14 ▼3.97
Events /wp-admin/admin.php?page=ea-events9809.00623.31102.81
Venues /wp-admin/admin.php?page=ea-venues1,1809.13331.7933.81
Speakers /wp-admin/admin.php?page=ea-speakers1,2499.57177.0846.83
Carousels /wp-admin/admin.php?page=ea-carousels1,1898.47172.8339.75
Forms /wp-admin/admin.php?page=ea-forms1,1898.70176.8365.67
Customers /wp-admin/admin.php?page=ea-customers1,2759.38163.1241.52
Coupons /wp-admin/admin.php?page=ea-coupons1,2349.14162.2942.82
Registrations /wp-admin/admin.php?page=ea-registrations1,51812.02187.7448.94
Categories /wp-admin/admin.php?page=ea-categories1,1748.95172.8537.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-posts
    • EVENT_AGENT_CONFIG_KEY
    • EVENT_AGENT_ADMIN_KEY
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • EVENT_AGENT_PUBLIC_KEY
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/event-agent/vendor/stripe/stripe-php/build.php
    • > /wp-content/plugins/event-agent/vendor/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/event-agent/public/partials/carousel.php
    • > /wp-content/plugins/event-agent/public/partials/venue.php
  • 146× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\ApiErrorException' not found in wp-content/plugins/event-agent/vendor/stripe/stripe-php/lib/Exception/InvalidRequestException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/event-agent/vendor/stripe/stripe-php/lib/Dispute.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/event-agent/vendor/stripe/stripe-php/lib/FileLink.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/event-agent/vendor/stripe/stripe-php/lib/File.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/event-agent/public/partials/card.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\StripeObject' not found in wp-content/plugins/event-agent/vendor/stripe/stripe-php/lib/OAuthErrorObject.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/event-agent/vendor/stripe/stripe-php/lib/Issuing/Dispute.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/event-agent/vendor/stripe/stripe-php/lib/Invoice.php:103
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/event-agent/public/partials/registration.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/event-agent/vendor/stripe/stripe-php/lib/CreditNoteLineItem.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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 require attention:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
The official readme.txt is a good inspiration

event-agent/event-agent.php 85% from 13 tests

"EventAgent.ai" version 4.3.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.6" instead of "5.0")
  • Description: Please keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Please fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/event-agent/vendor/stripe/stripe-php/data/ca-certificates.crt
33,687 lines of code in 240 files:
LanguageFilesBlank linesComment linesLines of code
CSS92,9874813,145
PHP1731,4655,0248,856
JavaScript491,0081718,210
PO File29641,2582,470
Markdown36110897
JSON10048
XML10031
make19027
YAML1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.90
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces16
Interfaces5
Traits7
Classes130
▷ Abstract classes86.15%
▷ Concrete classes12293.85%
▷ Final classes00.00%
Methods372
▷ Static methods15842.47%
▷ Public methods32386.83%
▷ Protected methods154.03%
▷ Private methods349.14%
Functions30
▷ Named functions413.33%
▷ Anonymous functions2686.67%
Constants641
▷ Global constants30.47%
▷ Class constants63899.53%
▷ Public constants638100.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 are no PNG files in this plugin