73% amr-ical-events-list

Code Review | amr ical events lists

WordPress plugin amr ical events lists scored 73% from 54 tests.

About plugin

  • Plugin page: amr-ical-events-list
  • Plugin version: 6.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 5.9.2
  • First release: Sep 1, 2008
  • Latest release: Feb 1, 2022
  • Number of updates: 443
  • Update frequency: every 11.1 days
  • Top authors: anmari (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

2,000+ active / 162,208 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼288.80ms] 75% from 4 tests

An overview of server-side resources used by amr ical events lists
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,404.13ms on /wp-admin/admin.php?page=add-ons)
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1057.91 ▲5.18
Dashboard /wp-admin3.46 ▲0.0634.44 ▲0.91
Posts /wp-admin/edit.php3.69 ▲0.0539.61 ▲5.46
Add New Post /wp-admin/post-new.php6.93 ▼0.0496.20 ▼1,153.42
Media Library /wp-admin/upload.php3.34 ▲0.0424.36 ▼7.86
iCal Events List /wp-admin/admin.php?page=manage_amr_ical3.5626.72
+ updates /wp-admin/admin.php?page=amr_events_updates_page3.3123.02
Add ons /wp-admin/admin.php?page=add-ons3.341,404.13
List types /wp-admin/admin.php?page=manage_event_listing3.5726.82
Fields for lists /wp-admin/admin.php?page=manage_event_fields3.7923.79

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 197 new files
Database: no new tables, 2 new options
New WordPress options
widget_amr_icalendar_widget
widget_amr-ical-upe

Browser metrics Passed 4 tests

An overview of browser requirements for amr ical events lists
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,943 ▲22116.22 ▲0.148.64 ▲3.042.07 ▼0.36
Dashboard /wp-admin2,937 ▲766.18 ▼0.08116.33 ▼15.14157.04 ▲1.22
Posts /wp-admin/edit.php2,741 ▲503.24 ▲0.0262.22 ▲0.38137.15 ▼3.71
Add New Post /wp-admin/post-new.php1,791 ▲3317.68 ▼3.56416.43 ▼16.39158.66 ▼0.09
Media Library /wp-admin/upload.php1,749 ▲515.54 ▼0.02138.91 ▼5.45187.00 ▲2.42
iCal Events List /wp-admin/admin.php?page=manage_amr_ical1,4832.5355.40143.91
+ updates /wp-admin/admin.php?page=amr_events_updates_page1,0272.4552.17103.30
Add ons /wp-admin/admin.php?page=add-ons1,1912.6359.09125.17
List types /wp-admin/admin.php?page=manage_event_listing1,6412.5454.90166.99
Fields for lists /wp-admin/admin.php?page=manage_event_fields1,6572.5154.99135.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-admin/includes/file.php+148
    opendir(wp-content/uploads/ical-events-cache/): failed to open dir: No such file or directory
  • Zombie WordPress options detected upon uninstall: 2 options
    • widget_amr-ical-upe
    • widget_amr_icalendar_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)
Good news, no errors were detected

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 items
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function amr_set_defaults_for_datetime() in wp-content/plugins/amr-ical-events-list/includes/amr-ical-events-list-main.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/amr-ical-events-list/includes/functions-examples.php:12
    • > PHP Warning
      Use of undefined constant AMR_PHPVERSION_REQUIRED - assumed 'AMR_PHPVERSION_REQUIRED' (this will throw an Error in a future version of PHP) in wp-content/plugins/amr-ical-events-list/includes/amr-ical-events-list-main.php on line 7
    • > PHP Notice
      Undefined variable: where_am_i in wp-content/plugins/amr-ical-events-list/amr-ical-custom-style-file-example.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/amr-ical-events-list/includes/timezones/amr-windows-zones.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/amr-ical-events-list/amr-ical-events-list.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/amr-ical-events-list/includes/amr-ical-post-type.php:75
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/amr-ical-events-list/includes/amr-upcoming-events-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/amr-ical-events-list/includes/timezones/amr-windows-zones.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'amrical_plugin_admin' not found in wp-content/plugins/amr-ical-events-list/includes/amr-ical-list-admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (30 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Add an image for screenshot #10 (Just for fun - Multiple Groupings (unstyled here, but with styling tags, so imagine what you could do ))
The official readme.txt might help

amr-ical-events-list/amr-ical-events-list.php 92% from 13 tests

"amr ical events lists" version 6.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 472 characters long)

Code Analysis Passed 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 plugin28,132 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PO File167,61715,53616,974
PHP261,8291,61510,279
CSS8107125841
JavaScript111532
HTML2006

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity19.60
▷ Minimum class complexity3.00
▷ Maximum class complexity40.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods3692.31%
▷ Protected methods00.00%
▷ Private methods37.69%
Functions349
▷ Named functions34799.43%
▷ Anonymous functions20.57%
Constants36
▷ Global constants36100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
114 PNG files occupy 0.20MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/addtogoogle_16.png0.93KB0.97KB0.00%
images/email_16.png0.59KB0.44KB▼ 26.64%
(invalid) images/extras/feed.png0.71KB0.00KB▼ 100.00%
images/information.png0.76KB0.83KB0.00%
images/accept_16.png0.70KB0.69KB0.14%