73% eventonai

Code Review | EventonAI

WordPress plugin EventonAI scored73%from 54 tests.

About plugin

  • Plugin page: eventonai
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2023
  • Latest release: Jul 13, 2023
  • Number of updates: 10
  • Update frequency: every 3.0 days
  • Top authors: momothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /218 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲5.41MB] [CPU: ▲25.59ms] 75% from 4 tests

This is a short check of server-side resources used by EventonAI
Please fix the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.41MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.20 ▲5.7471.65 ▲26.68
Dashboard /wp-admin9.22 ▲5.9278.32 ▲22.73
Posts /wp-admin/edit.php9.22 ▲5.8682.68 ▲28.63
Add New Post /wp-admin/post-new.php10.00 ▲4.11130.62 ▲24.31
Media Library /wp-admin/upload.php9.22 ▲5.9975.11 ▲36.46
Freemius Debug [v.2.5.9] /wp-admin/admin.php?page=freemius9.2273.58

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 214 new files
Database: no new tables, 9 new options
New WordPress options
fs_active_plugins
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
fs_debug_mode
fs_accounts

Browser metrics Passed 4 tests

Checking browser requirements for EventonAI
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲7714.71 ▲0.401.74 ▼0.0932.22 ▼9.95
Dashboard /wp-admin2,241 ▲615.64 ▲0.0092.44 ▲1.9045.64 ▲2.12
Posts /wp-admin/edit.php2,154 ▲512.18 ▲0.1442.95 ▲2.5840.48 ▲3.56
Add New Post /wp-admin/post-new.php1,570 ▲4418.42 ▲0.89636.89 ▼7.3158.32 ▲8.86
Media Library /wp-admin/upload.php1,450 ▲504.28 ▲0.08101.27 ▼2.4644.38 ▼5.06
Freemius Debug [v.2.5.9] /wp-admin/admin.php?page=freemius1,1051.8527.3829.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/eventonai/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • fs_active_plugins
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • fs_accounts
    • fs_debug_mode
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 items
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eventonai/includes/admin/class-momo-acg-eo-admin-ajax.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/eventonai/includes/admin/pages/page-momo-acgeo-openai.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/eventonai/chatbot/admin/pages/page-momo-acg-chatbot.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/eventonai/chatbot/class-momo-acg-chatbot-shortcodes.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eventonai/chatbot/class-momo-acg-chatbot-ajax.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/eventonai/includes/admin/pages/page-momo-acgeo-instructions.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/eventonai/includes/admin/pages/momo-acg-eo-settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eventonai/chatbot/admin/class-momo-acg-chatbot-admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/eventonai/includes/admin/metabox/class-momo-acg-eo-metabox.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eventonai/chatbot/admin/class-momo-chatbot-admin-ajax.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.jpg) image required
You can look at the official readme.txt

eventonai/class-momo-acg-for-eventon.php 77% from 13 tests

The principal PHP file in "EventonAI" v. 1.4.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.4" instead of "5.6")
  • Main file name: Name the main plugin file the same as the plugin slug ("eventonai.php" instead of "class-momo-acg-for-eventon.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin44,848 lines of code in 163 files:
LanguageFilesBlank linesComment linesLines of code
PHP1328,02617,66435,088
CSS21111527,287
SVG3001,638
JavaScript54789619
Markdown1680214
JSON1002

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,079)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity80.77
▷ Minimum class complexity1.00
▷ Maximum class complexity3,079.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes60
▷ Abstract classes23.33%
▷ Concrete classes5896.67%
▷ Final classes00.00%
Methods1,350
▷ Static methods19714.59%
▷ Public methods96171.19%
▷ Protected methods171.26%
▷ Private methods37227.56%
Functions95
▷ Named functions9397.89%
▷ Anonymous functions22.11%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%