83% ics-calendar

Code Review | ICS Calendar

WordPress plugin ICS Calendar scored83%from 54 tests.

About plugin

  • Plugin page: ics-calendar
  • Plugin version: 10.13.0.1
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: May 31, 2017
  • Latest release: Nov 29, 2023
  • Number of updates: 511
  • Update frequency: every 4.7 days
  • Top authors: room34 (100%)

Code review

54 tests

User reviews

57 reviews

Install metrics

10,000+ active /799,853 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▲2.02ms] Passed 4 tests

Server-side resources used by ICS Calendar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.15 ▲0.6942.91 ▲8.91
Dashboard /wp-admin3.98 ▲0.6853.83 ▲4.41
Posts /wp-admin/edit.php4.03 ▲0.6851.96 ▲5.75
Add New Post /wp-admin/post-new.php6.52 ▲0.6388.40 ▼7.31
Media Library /wp-admin/upload.php3.84 ▲0.6138.18 ▲5.24

Server storage [IO: ▲2.56MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 129 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
r34ics_transients_expiration
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
r34ics_use_new_defaults_10_6
r34ics_version
db_upgraded

Browser metrics Passed 4 tests

ICS Calendar: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,983 ▲22113.42 ▼0.728.23 ▲6.6137.84 ▼0.42
Dashboard /wp-admin2,256 ▲795.65 ▼0.0393.24 ▼5.6541.81 ▼6.42
Posts /wp-admin/edit.php2,340 ▲2372.05 ▲0.1141.00 ▲0.5434.57 ▼2.82
Add New Post /wp-admin/post-new.php1,744 ▲21323.31 ▲0.35650.87 ▲26.1353.48 ▲7.45
Media Library /wp-admin/upload.php1,427 ▲274.25 ▲0.0995.63 ▼0.1241.62 ▼1.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • r34ics_version
    • r34ics_use_new_defaults_10_6
    • r34ics_transients_expiration
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ics-calendar/templates/admin/utilities.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ics-calendar/templates/admin/add-calendar.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ics-calendar/templates/admin/admin-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ics-calendar/r34ics-ajax.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ics-calendar/templates/admin/add-calendar-button.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ics-calendar/templates/admin/sidebar.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/ics-calendar/templates/admin/admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ics-calendar/functions.php:1328

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
The official readme.txt is a good inspiration

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

"ICS Calendar" version 10.13.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 156 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin25,780 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
PO File394,8378,27516,723
PHP191,5712,5037,176
CSS518438958
JavaScript452101516
Markdown21010397
SVG100010

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity226.20
▷ Minimum class complexity5.00
▷ Maximum class complexity448.00
Average method complexity7.11
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods154
▷ Static methods31.95%
▷ Public methods8454.55%
▷ Protected methods6844.16%
▷ Private methods21.30%
Functions93
▷ Named functions7277.42%
▷ Anonymous functions2122.58%
Constants23
▷ Global constants00.00%
▷ Class constants23100.00%
▷ Public constants23100.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
There are no PNG files in this plugin