68% elegant-calendar-lite

Code Review | Elegant Calendar Lite - WordPress Events Calendar Plugin

WordPress plugin Elegant Calendar Lite - WordPress Events Calendar Plugin scored68%from 54 tests.

About plugin

  • Plugin page: elegant-calendar-...
  • Plugin version: 1.6.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2021
  • Latest release: Mar 8, 2023
  • Number of updates: 83
  • Update frequency: every 8.9 days
  • Top authors: darell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,613 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.09MB] [CPU: ▲28.33ms] 75% from 4 tests

Server-side resources used by Elegant Calendar Lite - WordPress Events Calendar Plugin
The following require your attention
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.09MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.90 ▲5.4460.30 ▲15.36
Dashboard /wp-admin8.92 ▲5.6279.92 ▲30.29
Posts /wp-admin/edit.php8.92 ▲5.5781.11 ▲34.90
Add New Post /wp-admin/post-new.php9.63 ▲3.74121.85 ▲36.17
Media Library /wp-admin/upload.php8.92 ▲5.6967.20 ▲32.75
Freemius Debug [v.2.5.4.2] /wp-admin/admin.php?page=freemius8.9263.41

Server storage [IO: ▲6.98MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2,925 new files
Database: no new tables, 9 new options
New WordPress options
fs_active_plugins
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
fs_debug_mode
fs_accounts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Elegant Calendar Lite - WordPress Events Calendar Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,016 ▲27015.20 ▲0.5629.39 ▲27.5927.96 ▼16.43
Dashboard /wp-admin2,240 ▲695.86 ▲0.96102.98 ▼22.7145.04 ▼2.89
Posts /wp-admin/edit.php2,126 ▲372.00 ▼0.0140.29 ▲3.7438.63 ▲1.08
Add New Post /wp-admin/post-new.php1,532 ▲1823.10 ▲5.42652.01 ▼41.0355.94 ▲5.52
Media Library /wp-admin/upload.php1,422 ▲434.25 ▲0.0794.53 ▼3.1646.17 ▲0.71
Freemius Debug [v.2.5.4.2] /wp-admin/admin.php?page=freemius1,0841.8426.7728.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/elegant-calendar-lite/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • fs_accounts
    • fs_debug_mode
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • fs_active_plugins
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/elegant-calendar-lite/admin/views/calendar/map.php
    • > /wp-content/plugins/elegant-calendar-lite/admin/views/calendar/list.php
    • > /wp-content/plugins/elegant-calendar-lite/admin/views/calendar/day.php
    • > /wp-content/plugins/elegant-calendar-lite/admin/views/calendar/month.php
    • > /wp-content/plugins/elegant-calendar-lite/admin/views/calendar/grid.php
    • > /wp-content/plugins/elegant-calendar-lite/admin/views/calendar/week.php
  • 31× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elegant-calendar-lite/admin/views/settings/content.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/elegant-calendar-lite/admin/views/settings/sections/tab-general.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/elegant-calendar-lite/admin/views/calendar/filter.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elegant-calendar-lite/admin/views/settings/header.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elegant-calendar-lite/admin/views/event/wizard/sections/tab-color.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elegant-calendar-lite/admin/views/event/list/header.php:1
    • > PHP Notice
      Undefined variable: filter in wp-content/plugins/elegant-calendar-lite/admin/views/calendar/grid.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/elegant-calendar-lite/admin/views/event/wizard/sections/tab-organizer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/elegant-calendar-lite/admin/views/settings/sections/tab-shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function elegant_single_event_meta_data() in wp-content/plugins/elegant-calendar-lite/templates/single-event-meta.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #15, #2, #3, #4, #5, #6, #7, #8, #9 in elegant-calendar-lite/assets to your readme.txt
The official readme.txt might help

elegant-calendar-lite/elegant-calendar-lite.php Passed 13 tests

The main PHP file in "Elegant Calendar Lite - WordPress Events Calendar Plugin" ver. 1.6.6 adds more information about the plugin and also serves as the entry point for this plugin
83 characters long description:
Elegant Calendar is a flexible plugin that make you easily manage and share events.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected44,364 lines of code in 1,974 files:
LanguageFilesBlank linesComment linesLines of code
PHP1708,77318,52936,147
CSS27705984,972
SVG1,736001,752
JavaScript402825321,279
Markdown1680214

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,079)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity67.04
▷ Minimum class complexity1.00
▷ Maximum class complexity3,079.00
Average method complexity4.34
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes69
▷ Abstract classes57.25%
▷ Concrete classes6492.75%
▷ Final classes00.00%
Methods1,395
▷ Static methods20514.70%
▷ Public methods98970.90%
▷ Protected methods251.79%
▷ Private methods38127.31%
Functions122
▷ Named functions122100.00%
▷ Anonymous functions00.00%
Constants152
▷ Global constants10166.45%
▷ Class constants5133.55%
▷ Public constants51100.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
40 PNG files occupy 0.38MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/images/elegant-calendar-event-details.png184.10KB58.04KB▼ 68.47%
assets/css/admin/images/ui-icons_228ef1_256x240.png4.51KB4.18KB▼ 7.28%
assets/images/img-bi@2x.png6.72KB3.40KB▼ 49.34%
assets/css/admin/images/ui-icons_ffffff_256x240.png6.33KB4.18KB▼ 33.99%