83% simple-google-icalendar-widget

Code Review | Simple Google Calendar Outlook Events Block Widget

WordPress plugin Simple Google Calendar Outlook Events Block Widget scored83%from 54 tests.

About plugin

  • Plugin page: simple-google-ica...
  • Plugin version: 2.1.5
  • PHP compatiblity: 5.3.0 tested with 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2017
  • Latest release: Aug 24, 2023
  • Number of updates: 75
  • Update frequency: every 27.7 days
  • Top authors: bramwaas (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /12,898 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.32MB] [CPU: ▼8.10ms] Passed 4 tests

A check of server-side resources used by Simple Google Calendar Outlook Events Block Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3342.24 ▼0.02
Dashboard /wp-admin3.63 ▲0.2952.41 ▼11.71
Posts /wp-admin/edit.php3.75 ▲0.3955.05 ▲0.37
Add New Post /wp-admin/post-new.php6.22 ▲0.3487.29 ▼21.02
Media Library /wp-admin/upload.php3.56 ▲0.3336.60 ▲0.98
Info /wp-admin/admin.php?page=simple_ical_info3.5234.38

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_simple_ical_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Google Calendar Outlook Events Block Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.191.79 ▲0.0443.96 ▼0.50
Dashboard /wp-admin2,206 ▲215.79 ▲0.89105.56 ▼9.6940.48 ▼1.61
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0639.99 ▼0.0234.32 ▼2.05
Add New Post /wp-admin/post-new.php6,350 ▲4,83127.72 ▲4.73896.15 ▲229.5861.59 ▲13.80
Media Library /wp-admin/upload.php1,385 ▼34.21 ▲0.0698.41 ▼5.2043.79 ▲0.27
Info /wp-admin/admin.php?page=simple_ical_info9912.0224.6539.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_simple_ical_widget
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-google-icalendar-widget/js/simple-ical-block.asset.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_wp_version_compatible() in wp-content/plugins/simple-google-icalendar-widget/simple-google-icalendar-widget.php:76

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (With theme Twenty Twenty-Two.), #2 (With theme WP Bootstrap Starter (with bootstrap 4 css and js).), #3 (Transform from Legacy widget block to Simple ical Block.)
The official readme.txt is a good inspiration

simple-google-icalendar-widget/simple-google-icalendar-widget.php 69% from 13 tests

"Simple Google Calendar Outlook Events Block Widget" version 2.1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Requires PHP: Required version number should only contain digits separated by dots (ex. "7.0" instead of "5.3.0 tested with 7.4")
  • Domain Path: The domain path folder was not found ("/languages")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.3.0" instead of "5.3")

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
There were no executable files found in this plugin1,537 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5864191,174
JavaScript1219300
CSS23640
JSON10023

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity58.00
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity11.86
▷ Minimum method complexity1.00
▷ Maximum method complexity96.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods523.81%
▷ Public methods1780.95%
▷ Protected methods00.00%
▷ Private methods419.05%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected