57% event-calendars

Code Review | Event Calendar

WordPress plugin Event Calendar scored57%from 54 tests.

About plugin

  • Plugin page: event-calendars
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.1
  • WordPress version: 6.3.1
  • First release: Mar 27, 2017
  • Latest release: Apr 26, 2019
  • Number of updates: 29
  • Update frequency: every 25.9 days
  • Top authors: totalsoft (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /2,896 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.80MB] [CPU: ▼34.92ms] Passed 4 tests

An overview of server-side resources used by Event Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1850.39 ▲12.13
Dashboard /wp-admin3.16 ▼0.1922.55 ▼37.04
Posts /wp-admin/edit.php3.16 ▼0.2023.98 ▼22.34
Add New Post /wp-admin/post-new.php3.16 ▼2.7322.27 ▼69.53
Media Library /wp-admin/upload.php3.16 ▼0.0721.59 ▼10.76

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 74 new files
Database: 7 new tables, 7 new options
New tables
wp_totalsoft_evcal_manager
wp_totalsoft_evcal_events
wp_totalsoft_evcal_eff_p1
wp_totalsoft_evcal_eff_p2
wp_totalsoft_evcal_eff_data
wp_totalsoft_evcal_ids
wp_totalsoft_fonts
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_event_calendar_ts
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Event Calendar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲21713.54 ▼0.819.43 ▲7.8336.97 ▼3.95
Dashboard /wp-admin2,241 ▲674.92 ▼0.6786.06 ▼1.5269.84 ▲28.43
Posts /wp-admin/edit.php2,165 ▲652.30 ▲0.3534.69 ▼1.3636.75 ▼0.79
Add New Post /wp-admin/post-new.php1,731 ▲20322.50 ▼0.59685.83 ▲60.5337.37 ▼17.25
Media Library /wp-admin/upload.php1,449 ▲494.29 ▲0.10103.86 ▲4.5977.31 ▲32.04
Total Products /wp-admin/admin.php?page=Total Soft Products?TS_EvCal_Nonce=a0fa0d7719280.420.093.51
Calendar Manager /wp-admin/admin.php?page=Event Calendar TS?TS_EvCal_Nonce=a0fa0d7719280.420.103.77
Theme Manager /wp-admin/admin.php?page=Total Soft Events?TS_EvCal_Nonce=a0fa0d7719280.420.073.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/event-calendars/index.php+35
    Undefined variable: bare_url
  • The plugin did not uninstall successfully, leaving 7 tables in the database
    • wp_totalsoft_evcal_manager
    • wp_totalsoft_evcal_eff_p2
    • wp_totalsoft_evcal_eff_p1
    • wp_totalsoft_evcal_events
    • wp_totalsoft_fonts
    • wp_totalsoft_evcal_ids
    • wp_totalsoft_evcal_eff_data
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_event_calendar_ts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/event-calendars/Includes/Total-Soft-Products.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/event-calendars/Includes/Event-Calendar-Install.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/event-calendars/Includes/Event-Calendar-Widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/event-calendars/Includes/Event-Calendar-Theme.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/event-calendars/Includes/Event-Calendar-Ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/event-calendars/Includes/Event-Calendar-New.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/event-calendars/Includes/Event-Calendar-Widget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=Total Soft Products?TS_EvCal_Nonce=a0fa0d7719
    • > Network (severe)
    wp-admin/admin.php?page=Total%20Soft%20Products?TS_EvCal_Nonce=a0fa0d7719 - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=Event Calendar TS?TS_EvCal_Nonce=a0fa0d7719
    • > Network (severe)
    wp-admin/admin.php?page=Event%20Calendar%20TS?TS_EvCal_Nonce=a0fa0d7719 - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=Total Soft Events?TS_EvCal_Nonce=a0fa0d7719
    • > Network (severe)
    wp-admin/admin.php?page=Total%20Soft%20Events?TS_EvCal_Nonce=a0fa0d7719 - Failed to load resource: the server responded with a status of 403 (Forbidden)

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 your attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
  • Screenshots: No descriptions were found for these screenshots #2, #3, #4 in event-calendars/assets to your readme.txt
Please take inspiration from this readme.txt

event-calendars/index.php 85% from 13 tests

"Event Calendar" version 1.0.4'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: Please rename the main PHP file in this plugin to the plugin slug ("event-calendars.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 243 characters long)

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
Good job! No executable or dangerous file extensions detected6,629 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
CSS924262,493
PHP7116191,865
JavaScript302111431,394
SVG300877

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity8.67
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.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

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.49MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Images/admin.png3.56KB0.98KB▼ 72.55%
Images/TotalSoftLogo.png10.79KB5.14KB▼ 52.38%
Images/Products/Gallery_video.png135.83KB50.52KB▼ 62.80%
Images/Products/Portfolio.png137.74KB68.13KB▼ 50.54%
Images/transparency-grid.png2.58KB2.80KB0.00%