62% ft-calendar

Code Review | FT Calendar

WordPress plugin FT Calendar scored62%from 54 tests.

About plugin

  • Plugin page: ft-calendar
  • Plugin version: 1.6.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1
  • WordPress version: 6.3.1
  • First release: Mar 17, 2011
  • Latest release: Feb 24, 2019
  • Number of updates: 65
  • Update frequency: every 44.9 days
  • Top authors: layotte (53.85%)blepoxp (20%)hallsofmontezuma (18.46%)pbaylies (7.69%)dougal (6.15%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /56,507 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
Installer ran successfully

Server metrics [RAM: ▼13.93MB] [CPU: ▼3,061,806.97ms] 75% from 4 tests

A check of server-side resources used by FT Calendar
Please have a look at the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 2,521.25ms on /wp-admin/admin.php?page=ftcalendar-help)
PageMemory (MB)CPU Time (ms)
Home /4.40 ▼58.2346.55 ▼12,247,243.25
Dashboard /wp-admin4.22 ▲0.8855.69 ▲1.12
Posts /wp-admin/edit.php4.28 ▲0.8858.36 ▲3.67
Add New Post /wp-admin/post-new.php6.77 ▲0.84100.55 ▲10.58
Media Library /wp-admin/upload.php4.09 ▲0.8148.06 ▲11.63
Import /wp-admin/admin.php?page=ftcalendar-import4.0640.51
Export /wp-admin/admin.php?page=ftcalendar-export4.0644.13
Calendars /wp-admin/edit-tags.php?taxonomy=ftcalendar4.0853.63
FT Calendar Help /wp-admin/admin.php?page=ftcalendar-help4.292,521.25
FT Calendar /wp-admin/admin.php?page=ftcalendar-general4.0640.46

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 67 new files
Database: 1 new table, 11 new options
New tables
wp_ftcalendar_events
New WordPress options
widget_recent-posts
widget_ft_cal_thumb_calendar
ft_cal_db_version
widget_recent-comments
widget_ft_cal_event_list
theysaidso_admin_options
ft_calendar_options
can_compress_scripts
widget_theysaidso_widget
ft_cal_version
...

Browser metrics Passed 4 tests

Checking browser requirements for FT Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲15913.86 ▼0.4910.57 ▲8.8541.74 ▼5.49
Dashboard /wp-admin2,238 ▲585.61 ▼0.0392.92 ▲4.9842.20 ▼0.02
Posts /wp-admin/edit.php2,198 ▲982.09 ▲0.0842.14 ▲1.7035.04 ▼5.45
Add New Post /wp-admin/post-new.php6,269 ▲4,74318.94 ▼4.65969.28 ▲306.8541.83 ▼18.89
Media Library /wp-admin/upload.php1,443 ▲434.17 ▼0.08104.40 ▼10.2348.59 ▲1.75
Import /wp-admin/admin.php?page=ftcalendar-import9381.9331.7630.77
Export /wp-admin/admin.php?page=ftcalendar-export8591.9426.7026.79
Calendars /wp-admin/edit-tags.php?taxonomy=ftcalendar1,4292.1730.1739.38
FT Calendar Help /wp-admin/admin.php?page=ftcalendar-help1,2491.9830.6037.89
FT Calendar /wp-admin/admin.php?page=ftcalendar-general1,0671.9730.8030.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_ftcalendar_events
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • widget_ft_cal_thumb_calendar
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • ft_calendar_options
    • ft_cal_version
    • db_upgraded
    • widget_ft_cal_event_list
    • widget_recent-comments
    • ...

Smoke tests 25% 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
  • 57 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ftcalendar-general
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 57 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ftcalendar-general
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_filter() in wp-content/plugins/ft-calendar/includes/feed-rdf.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ft-calendar/classes/class-widgets.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_filter() in wp-content/plugins/ft-calendar/includes/feed-rss.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_filter() in wp-content/plugins/ft-calendar/includes/feed-rss2.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/ft-calendar/ft-calendar.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_filter() in wp-content/plugins/ft-calendar/includes/feed-atom.php:10
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_calendar_data() on null in wp-content/plugins/ft-calendar/includes/feed-ical.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/edit-tags.php?taxonomy=ftcalendar
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/ft-calendar/includes/js/add-edit-taxonomy.js?ver=6.3.1:3:24)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ftcalendar-general
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=ftcalendar-general
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/ft-calendar/includes/js/general-settings.js?ver=6.3.1:2:30)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration 97% 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 to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

ft-calendar/ft-calendar.php Passed 13 tests

The main PHP script in "FT Calendar" version 1.6.1.1 is automatically included on every request by WordPress
45 characters long description:
A feature rich calendar plugin for WordPress.

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
Everything looks great! No dangerous files found in this plugin8,493 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP162,1371,5204,922
JavaScript91362971,890
CSS514065903
PO File4366434778

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity56.69
▷ Minimum class complexity4.00
▷ Maximum class complexity238.00
Average method complexity6.40
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods134
▷ Static methods00.00%
▷ Public methods134100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
26 PNG files occupy 0.26MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/css/ui-lightness/images/ui-icons_ffffff_256x240.png3.62KB4.11KB0.00%
includes/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.12KB0.18KB0.00%
screenshot-9.png60.90KB27.44KB▼ 54.94%
screenshot-6.png47.03KB23.66KB▼ 49.70%
includes/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.09KB0.14KB0.00%