83% events-calendar-for-google

Code Review | Events Calendar for Google

WordPress plugin Events Calendar for Google scored83%from 54 tests.

About plugin

  • Plugin page: events-calendar-f...
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Oct 13, 2021
  • Latest release: Sep 1, 2023
  • Number of updates: 31
  • Update frequency: every 22.2 days
  • Top authors: coolcoders (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

2,000+ active /22,306 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.86MB] [CPU: ▲1.11ms] Passed 4 tests

This is a short check of server-side resources used by Events Calendar for Google
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5139.45 ▼0.89
Dashboard /wp-admin4.29 ▲0.9851.90 ▲2.37
Posts /wp-admin/edit.php4.35 ▲1.0049.94 ▲2.87
Add New Post /wp-admin/post-new.php6.85 ▲0.9790.30 ▲0.09
Media Library /wp-admin/upload.php4.19 ▲0.9640.62 ▲7.99
Go Pro /wp-admin/admin.php?page=gc-general-settings&page=gc-pro-features4.4544.43
Advanced Settings /wp-admin/admin.php?page=gc-general-settings&page=gc-advanced-settings4.9441.84
Event Attributes /wp-admin/admin.php?page=gc-general-settings&page=gc-event-attributes4.4939.36

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 150 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Events Calendar for Google
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲21213.81 ▼0.575.54 ▲3.8639.04 ▼8.87
Dashboard /wp-admin2,237 ▲525.14 ▲0.23105.70 ▼8.9841.06 ▼2.49
Posts /wp-admin/edit.php2,120 ▲312.07 ▲0.0835.95 ▼1.9133.90 ▲1.40
Add New Post /wp-admin/post-new.php1,547 ▲1318.33 ▼4.90620.77 ▼64.6549.64 ▼3.18
Media Library /wp-admin/upload.php1,422 ▲344.24 ▲0.07102.93 ▲2.4243.01 ▲0.26
Go Pro /wp-admin/admin.php?page=gc-general-settings&page=gc-pro-features8652.1631.5524.49
Advanced Settings /wp-admin/admin.php?page=gc-general-settings&page=gc-advanced-settings4,7023.1894.6927.56
Event Attributes /wp-admin/admin.php?page=gc-general-settings&page=gc-event-attributes9651.9532.0423.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 39× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/events-calendar-for-google/cmb2/includes/types/CMB2_Type_Counter_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/events-calendar-for-google/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/events-calendar-for-google/cmb2/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_timezone_string() in wp-content/plugins/events-calendar-for-google/admin/cmb2_gc_options_fields.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/events-calendar-for-google/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/events-calendar-for-google/cmb2/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/events-calendar-for-google/cmb2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/events-calendar-for-google/cmb2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/events-calendar-for-google/cmb2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Select' not found in wp-content/plugins/events-calendar-for-google/cmb2/includes/types/CMB2_Type_Taxonomy_Select_Hierarchical.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: calendar, event, event calendar, events, google calendar...

events-calendar-for-google/events_calendar_for_google.php 85% from 13 tests

The principal PHP file in "Events Calendar for Google" v. 2.1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("events-calendar-for-google.php" instead of "events_calendar_for_google.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin42,090 lines of code in 104 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript116071,51215,010
SVG3009,552
CSS171,9031,3279,256
PHP652,4576,5527,901
PO File896104371

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity19.08
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes74
▷ Abstract classes912.16%
▷ Concrete classes6587.84%
▷ Final classes00.00%
Methods582
▷ Static methods9115.64%
▷ Public methods48483.16%
▷ Protected methods8915.29%
▷ Private methods91.55%
Functions23
▷ Named functions2295.65%
▷ Anonymous functions14.35%
Constants11
▷ Global constants545.45%
▷ Class constants654.55%
▷ Public constants6100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.95MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/pro-features.png903.63KB263.90KB▼ 70.80%
cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%