56% my-calendar

Code Review | My Calendar

WordPress plugin My Calendar scored56%from 54 tests.

About plugin

  • Plugin page: my-calendar
  • Plugin version: 3.4.23
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Apr 5, 2010
  • Latest release: Nov 28, 2023
  • Number of updates: 756
  • Update frequency: every 6.6 days
  • Top authors: joedolson (100%)

Code review

54 tests

User reviews

142 reviews

Install metrics

20,000+ active /2,305,362 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲4.68MB] [CPU: ▲27.02ms] 50% from 4 tests

This is a short check of server-side resources used by My Calendar
Please have a look at the following items
  • RAM: Total memory usage must be kept under 10MB (currently 11.69MB on /wp-admin/admin.php?page=my-calendar-categories)
  • CPU: Total CPU usage must kept under 500.00ms (currently 517.64ms on /wp-admin/admin.php?page=mc-contextual-help)
PageMemory (MB)CPU Time (ms)
Home /8.15 ▲4.6975.34 ▲35.69
Dashboard /wp-admin7.99 ▲4.6481.55 ▲20.60
Posts /wp-admin/edit.php8.12 ▲4.7688.75 ▲42.57
Add New Post /wp-admin/post-new.php10.60 ▲4.71117.46 ▲16.98
Media Library /wp-admin/upload.php7.90 ▲4.6867.95 ▲34.82
Settings /wp-admin/admin.php?page=my-calendar-config7.9281.90
Design /wp-admin/admin.php?page=my-calendar-design8.01119.52
My Calendar Contextual Help /wp-admin/admin.php?page=mc-contextual-help12.97517.64
Categories /wp-admin/admin.php?page=my-calendar-categories11.69410.34
Events /wp-admin/admin.php?page=my-calendar-manage7.9275.05
Add Event /wp-admin/admin.php?page=my-calendar7.9881.69
Shortcodes /wp-admin/admin.php?page=my-calendar-shortcodes7.8883.87
Locations /wp-admin/admin.php?page=my-calendar-location-manager7.9167.48
Help /wp-admin/admin.php?page=my-calendar-help7.8874.95
Add New Location /wp-admin/admin.php?page=my-calendar-locations7.9264.32

Server storage [IO: ▲3.07MB] [DB: ▲1.00MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,174 new files
Database: 6 new tables, 19 new options
New tables
wp_my_calendar
wp_my_calendar_locations
wp_my_calendar_categories
wp_my_calendar_events
wp_my_calendar_location_relationships
wp_my_calendar_category_relationships
New WordPress options
mc_db_version
widget_theysaidso_widget
mc_category_icon_event_1
mc_promotion_scheduled
can_compress_scripts
db_upgraded
widget_my_calendar_simple_search
mc_count_cache
widget_my_calendar_today_widget
mc_version
...

Browser metrics Passed 4 tests

Checking browser requirements for My Calendar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,051 ▲28914.01 ▼0.3310.77 ▲9.0737.63 ▼5.55
Dashboard /wp-admin2,297 ▲1235.82 ▲0.2395.75 ▲3.2743.57 ▼3.55
Posts /wp-admin/edit.php2,207 ▲1102.25 ▲0.2342.63 ▲4.8934.51 ▲2.96
Add New Post /wp-admin/post-new.php1,606 ▲6223.03 ▼1.87601.61 ▼9.7734.14 ▼30.80
Media Library /wp-admin/upload.php1,536 ▲1364.57 ▲0.39100.01 ▲3.5242.04 ▼1.42
Settings /wp-admin/admin.php?page=my-calendar-config3,2692.5270.9339.51
Design /wp-admin/admin.php?page=my-calendar-design4,3797.33154.5378.71
My Calendar Contextual Help /wp-admin/admin.php?page=mc-contextual-help7971.9431.3419.21
Categories /wp-admin/admin.php?page=my-calendar-categories1,4322.3952.9838.14
Events /wp-admin/admin.php?page=my-calendar-manage1,5852.2132.8733.28
Add Event /wp-admin/admin.php?page=my-calendar4,4047.56159.9998.28
Shortcodes /wp-admin/admin.php?page=my-calendar-shortcodes2,4992.1337.5038.05
Locations /wp-admin/admin.php?page=my-calendar-location-manager1,2882.1336.3933.90
Help /wp-admin/admin.php?page=my-calendar-help1,2502.1537.8834.90
Add New Location /wp-admin/admin.php?page=my-calendar-locations1,3822.1235.5034.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 6 tables in the database
    • wp_my_calendar_categories
    • wp_my_calendar_category_relationships
    • wp_my_calendar_location_relationships
    • wp_my_calendar
    • wp_my_calendar_locations
    • wp_my_calendar_events
  • The uninstall procedure has failed, leaving 10 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • mc-event-category_children
    • widget_recent-posts
    • mc_version
    • db_upgraded
    • mc_uninstalled
    • mc_db_version

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mc-contextual-help
    • > Notice in wp-content/plugins/my-calendar/my-calendar-help.php+358
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mc-contextual-help
    • > Notice in wp-content/plugins/my-calendar/my-calendar-help.php+358
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/my-calendar/mc-templates/location-single.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc_event_classes() in wp-content/plugins/my-calendar/mc-templates/event-upcoming.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Gamajo_Template_Loader' not found in wp-content/plugins/my-calendar/includes/class-mc-template-loader.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc_event_classes() in wp-content/plugins/my-calendar/mc-templates/event-today.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc_event_classes() in wp-content/plugins/my-calendar/mc-templates/event-next.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc_template_tag() in wp-content/plugins/my-calendar/mc-templates/event-grid.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc_template_tag() in wp-content/plugins/my-calendar/mc-templates/event-single.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/my-calendar/templates/my-calendar-template.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc_template_tag() in wp-content/plugins/my-calendar/mc-templates/event-list.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc_event_classes() in wp-content/plugins/my-calendar/mc-templates/event-now.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc_template_tag() in wp-content/plugins/my-calendar/mc-templates/event-mini.php:14

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=my-calendar-design
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=my-calendar-design 1128:264 Uncaught ReferenceError: resizeIframe is not defined
    • > GET request to /wp-admin/admin.php?page=my-calendar-design
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=my-calendar-design 1116:264 Uncaught ReferenceError: resizeIframe is not defined
    • > GET request to /wp-admin/admin.php?page=my-calendar-design
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=my-calendar-design 1104:267 Uncaught ReferenceError: resizeIframe is not defined
    • > GET request to /wp-admin/admin.php?page=my-calendar-design
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=my-calendar-design 1140:264 Uncaught ReferenceError: resizeIframe is not defined

Optimizations

Plugin configuration 90% 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:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
You can look at the official readme.txt

my-calendar/my-calendar.php 85% from 13 tests

The primary PHP file in "My Calendar" version 3.4.23 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/lang")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("lang")

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
Everything looks great! No dangerous files found in this plugin36,934 lines of code in 1,113 files:
LanguageFilesBlank linesComment linesLines of code
PHP601,9328,85022,721
CSS281,6462838,549
JavaScript791,1521,1084,687
SVG94300943
Markdown29019
XML10015

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity26.11
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity8.06
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods32
▷ Static methods412.50%
▷ Public methods2887.50%
▷ Protected methods412.50%
▷ Private methods00.00%
Functions563
▷ Named functions55899.11%
▷ Anonymous functions50.89%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
42 compressed PNG files occupy 0.07MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/old-icons/ball.png0.92KB1.00KB0.00%
images/old-icons/32x32/concert.png2.06KB1.37KB▼ 33.63%
images/old-icons/tickets.png0.76KB0.80KB0.00%
images/old-icons/rehearsal.png0.60KB0.59KB▼ 0.82%
images/old-icons/appointment.png0.95KB1.00KB0.00%