10% ci-eventspot

Code Review | CI EventSpot

WordPress plugin CI EventSpot scored10%from 54 tests.

About plugin

  • Plugin page: ci-eventspot
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.6
  • WordPress version: 6.3.1
  • First release: Dec 9, 2016
  • Latest release: Dec 16, 2016
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: gurcharanphp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /495 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/ci-eventspot/ci-event-spot.php+28
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼50.60ms] Passed 4 tests

This is a short check of server-side resources used by CI EventSpot
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.398.14 ▼29.64
Dashboard /wp-admin2.09 ▼1.216.62 ▼42.27
Posts /wp-admin/edit.php2.09 ▼1.266.44 ▼41.51
Add New Post /wp-admin/post-new.php2.09 ▼3.796.14 ▼88.98
Media Library /wp-admin/upload.php2.09 ▼1.148.14 ▼23.93
1 /wp-admin/admin.php?page=es_manage_event2.097.35
1 /wp-admin/admin.php?page=es_tutorial2.096.43
1 /wp-admin/admin.php?page=es_update_event2.095.48
1 /wp-admin/admin.php?page=es_help_page2.096.83
1 /wp-admin/admin.php?page=es_settings_page2.096.30

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 48 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
widget_cies_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for CI EventSpot
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,108 ▲36214.06 ▼0.3110.73 ▲8.9952.00 ▲10.89
Dashboard /wp-admin2,277 ▲895.10 ▲0.25139.07 ▲23.0598.50 ▲57.21
Posts /wp-admin/edit.php2,160 ▲712.41 ▲0.4044.80 ▲8.1247.91 ▲11.74
Add New Post /wp-admin/post-new.php1,561 ▲2817.69 ▼5.52610.77 ▼33.1736.97 ▼10.79
Media Library /wp-admin/upload.php1,450 ▲654.37 ▲0.14110.11 ▲7.9980.48 ▲36.04
1 /wp-admin/admin.php?page=es_manage_event3,4131.9240.5554.74
1 /wp-admin/admin.php?page=es_tutorial1,0031.8528.0431.13
1 /wp-admin/admin.php?page=es_update_event3,4891.8936.9451.27
1 /wp-admin/admin.php?page=es_help_page8911.8826.3429.73
1 /wp-admin/admin.php?page=es_settings_page9631.8732.8431.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/ci-eventspot/ci-event-spot.php+28
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_cies_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > Deprecated in wp-content/plugins/ci-eventspot/ci-event-spot.php+28
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > Deprecated in wp-content/plugins/ci-eventspot/controller/es_widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; cies_widget has a deprecated constructor
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-core handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-datepicker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in cies_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=es_manage_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_manage_event.php+870
    Undefined index: results
    • > GET request to /wp-admin/admin.php?page=es_manage_event
    • > Warning in wp-content/plugins/ci-eventspot/view/es_manage_event.php+871
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+12
    Undefined index: event_id
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+25
    Undefined index: title
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+30
    Undefined index: name
  • 25 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+61
    Undefined index: type
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+67
    Undefined index: description
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+78
    Undefined index: start_date
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+79
    Undefined index: end_date
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+81
    Undefined offset: 1
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+211
    Undefined variable: selected_pm
  • 126 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+346
    Undefined index: time_zone_id
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+366
    Undefined index: location
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+370
    Undefined index: city
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+358
    Undefined index: state
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+358
    Undefined index: country
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+865
    Undefined index: postal_code
  • 240 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+859
    Undefined index: country_code
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+887
    Undefined index: contact
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Notice in wp-content/plugins/ci-eventspot/view/es_update_event.php+887
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > Notice in wp-content/plugins/ci-eventspot/ci-event-spot.php+112
    Undefined index: constant_contact_api_key
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > Notice in wp-content/plugins/ci-eventspot/ci-event-spot.php+131
    Undefined index: constant_contact_secret_key
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > Notice in wp-content/plugins/ci-eventspot/ci-event-spot.php+150
    Undefined index: constant_contact_access_token

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ci-eventspot/view/es_dashboard.php
    • > /wp-content/plugins/ci-eventspot/view/es_settings.php
    • > /wp-content/plugins/ci-eventspot/view/es_header.php
    • > /wp-content/plugins/ci-eventspot/view/es_support.php
  • 37× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ci-eventspot/controller/es_widget.php:3
    • > PHP Notice
      Undefined index: page in wp-content/plugins/ci-eventspot/view/es_header.php on line 15
    • > PHP Notice
      Undefined index: page in wp-content/plugins/ci-eventspot/view/es_header.php on line 15
    • > PHP Notice
      Undefined index: page in wp-content/plugins/ci-eventspot/view/es_header.php on line 12
    • > PHP Notice
      Undefined variable: api_key in wp-content/plugins/ci-eventspot/view/es_settings.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ci-eventspot/controller/function.php:100
    • > PHP Notice
      Undefined index: page in wp-content/plugins/ci-eventspot/view/es_header.php on line 15
    • > PHP Notice
      Undefined variable: secret_key in wp-content/plugins/ci-eventspot/view/es_settings.php on line 25
    • > PHP Notice
      Undefined index: page in wp-content/plugins/ci-eventspot/view/es_header.php on line 9
    • > PHP Notice
      Undefined index: page in wp-content/plugins/ci-eventspot/view/es_header.php on line 12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=es_manage_event
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=es_manage_event 148:22 Uncaught TypeError: jQuery(...).live is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Network (severe)
    wp-content/plugins/ci-eventspot/js/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=es_tutorial
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=es_tutorial 148:22 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=es_update_event
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=es_update_event 148:22 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=es_help_page
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=es_help_page 148:22 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=es_settings_page
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=es_settings_page 148:22 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: No descriptions were found for these screenshots #0, #0, #0, #0 in ci-eventspot/assets to your readme.txt
You can take inspiration from this readme.txt

ci-eventspot/ci-event-spot.php 85% from 13 tests

"CI EventSpot" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ci-eventspot.php" instead of "ci-event-spot.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.6" instead of "4.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,149 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS6223741,478
PHP11312571,012
JavaScript616756659

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code1.20
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 PNG files occupy 0.61MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshort/EventSpot_80_80.png9.01KB3.01KB▼ 66.57%
screenshort/preview/EventSpot_80_80.png9.01KB3.01KB▼ 66.57%
screenshot2.png52.17KB29.48KB▼ 43.48%
screenshort/EventSpot_widget.png56.12KB34.44KB▼ 38.63%
screenshort/EventSpot_500_300.png45.22KB20.90KB▼ 53.78%