72% fat-event-lite

Code Review | FAT Event Lite

WordPress plugin FAT Event Lite scored72%from 54 tests.

About plugin

  • Plugin page: fat-event-lite
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.4
  • WordPress version: 6.3.1
  • First release: May 16, 2020
  • Latest release: May 16, 2020
  • Number of updates: 17
  • Update frequency: every 0.1 days
  • Top authors: roninwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /977 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.61MB] [CPU: ▲8.59ms] Passed 4 tests

An overview of server-side resources used by FAT Event Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.96 ▲1.5051.89 ▲9.02
Dashboard /wp-admin4.96 ▲1.6661.47 ▲7.85
Posts /wp-admin/edit.php5.03 ▲1.6766.11 ▲19.39
Add New Post /wp-admin/post-new.php7.61 ▲1.72102.88 ▲2.79
Media Library /wp-admin/upload.php4.86 ▲1.6346.68 ▲14.70
Add Event /wp-admin/post-new.php?post_type=fat-event5.6681.41
Booking /wp-admin/edit.php?post_type=fat-event-booking4.9456.49
All FAT Event /wp-admin/edit.php?post_type=fat-event4.9549.48
Shortcodes /wp-admin/edit.php?post_type=fat-calendar4.9491.88
Tags /wp-admin/edit-tags.php?taxonomy=fat-event-tag&post_type=fat-event4.8865.74
Go Pro /wp-admin/edit.php?post_type=fat-event&page=fat-event-go-pro4.8451.44
Settings /wp-admin/edit.php?post_type=fat-event&page=fat-event-setting5.3265.88
Organizers /wp-admin/edit-tags.php?taxonomy=fat-event-organizer&post_type=fat-event5.1953.04
Locations /wp-admin/edit-tags.php?taxonomy=fat-event-location&post_type=fat-event5.1951.49
Categories /wp-admin/edit-tags.php?taxonomy=fat-event-category&post_type=fat-event4.8851.58

Server storage [IO: ▲6.53MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 218 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
fat_event_flush_rewrite
fat_event_setting
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

FAT Event Lite: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,024 ▲27815.21 ▲0.561.73 ▲0.0638.17 ▼7.13
Dashboard /wp-admin2,427 ▲2366.55 ▲0.65138.76 ▲25.3143.04 ▲1.15
Posts /wp-admin/edit.php2,336 ▲2473.43 ▲1.2557.61 ▲22.7934.99 ▼1.12
Add New Post /wp-admin/post-new.php1,585 ▲5017.63 ▼5.37626.74 ▼76.6636.39 ▼15.61
Media Library /wp-admin/upload.php1,472 ▲814.28 ▲0.0481.53 ▼15.5141.21 ▼2.31
Add Event /wp-admin/post-new.php?post_type=fat-event6,7829.96342.3399.26
Booking /wp-admin/edit.php?post_type=fat-event-booking1,3533.4947.3829.61
All FAT Event /wp-admin/edit.php?post_type=fat-event1,4363.6243.4833.25
Shortcodes /wp-admin/edit.php?post_type=fat-calendar1,3083.5064.4343.57
Tags /wp-admin/edit-tags.php?taxonomy=fat-event-tag&post_type=fat-event1,4813.2559.1940.59
Go Pro /wp-admin/edit.php?post_type=fat-event&page=fat-event-go-pro1,2043.1854.3573.05
Settings /wp-admin/edit.php?post_type=fat-event&page=fat-event-setting4,2115.29130.8544.12
Organizers /wp-admin/edit-tags.php?taxonomy=fat-event-organizer&post_type=fat-event1,5903.3050.3133.09
Locations /wp-admin/edit-tags.php?taxonomy=fat-event-location&post_type=fat-event2,1947.51137.75151.08
Categories /wp-admin/edit-tags.php?taxonomy=fat-event-category&post_type=fat-event1,5123.3554.8830.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • fat_event_flush_rewrite
    • widget_recent-posts
    • can_compress_scripts
    • fat_event_setting
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 8× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/fat-event-lite/libs/fat-cmb/fat-cmb.php
    • > /wp-content/plugins/fat-event-lite/inc/menu.php
    • > /wp-content/plugins/fat-event-lite/inc/shortcodes.php
    • > /wp-content/plugins/fat-event-lite/libs/fat-cmb/templates/init-field.php
    • > /wp-content/plugins/fat-event-lite/assets/css/frontend/custom-font.php
    • > /wp-content/plugins/fat-event-lite/assets/css/frontend/custom-css.php
    • > /wp-content/plugins/fat-event-lite/templates/filters/listing.php
    • > /wp-content/plugins/fat-event-lite/inc/cpt.php
  • 89× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/fat-event-lite/templates/layouts/event_booking.php:11
    • > PHP Notice
      Undefined variable: list_amenities in wp-content/plugins/fat-event-lite/templates/single/part/amenities.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/fat-event-lite/templates/skins/list-skin-01.php:17
    • > PHP Notice
      Undefined variable: total_found in wp-content/plugins/fat-event-lite/templates/pagings/infinite-scroll.php on line 12
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/fat-event-lite/templates/single/part/amenities-sidebar.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/fat-event-lite/templates/filters/dropdown.php:9
    • > PHP Notice
      Undefined variable: total_found in wp-content/plugins/fat-event-lite/templates/pagings/infinite-scroll.php on line 13
    • > PHP Notice
      Undefined variable: total_found in wp-content/plugins/fat-event-lite/templates/pagings/load-more.php on line 13
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/fat-event-lite/templates/ical/ical.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/fat-event-lite/templates/skins/skin-02.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=fat-event
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/post-new.php?post_type=fat-event
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/post-new.php?post_type=fat-event
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.clear is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/post-new.php?post_type=fat-event
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.clearAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/edit.php?post_type=fat-event&page=fat-event-setting
    • > Network (severe)
    wp-content/plugins/fat-event-lite/libs/fat-cmb/assets/js/ace/mode-html.js - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=fat-event&page=fat-event-setting
    • > Network (severe)
    wp-content/plugins/fat-event-lite/libs/fat-cmb/assets/js/ace/mode-css.js - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit-tags.php?taxonomy=fat-event-location&post_type=fat-event
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key=AIzaSyDnjdX5Zv3gPDvsYE2ZsbyQ-xl4TbSu8ts&libraries=places&callback=fat_google_map_init&ver=6.3.1 163:311 "google.maps.event.addDomListener() is deprecated, use the standard\naddEventListener() method instead:\nhttps://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener\nThe feature will continue to work and there is no plan to decommission\nit."
    • > GET request to /wp-admin/edit-tags.php?taxonomy=fat-event-location&post_type=fat-event
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?key=AIzaSyDnjdX5Zv3gPDvsYE2ZsbyQ-xl4TbSu8ts&libraries=places&callback=fat_google_map_init&ver=6.3.1 152:248 "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started"

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: calendar, tickets, event, schedule, woocommerce integrated...

fat-event-lite/fat-event-lite.php Passed 13 tests

The main PHP file in "FAT Event Lite" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
35 characters long description:
WordPress Event and Calendar Plugin

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected61,727 lines of code in 176 files:
LanguageFilesBlank linesComment linesLines of code
JSON20016,894
PHP881,24278115,872
JavaScript532,2872,21014,324
CSS251,0691549,617
SVG6002,931
PO File11,0021,4642,085
Markdown1204

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 236)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity46.94
▷ Minimum class complexity3.00
▷ Maximum class complexity374.00
Average method complexity9.13
▷ Minimum method complexity1.00
▷ Maximum method complexity236.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes33
▷ Abstract classes00.00%
▷ Concrete classes33100.00%
▷ Final classes00.00%
Methods187
▷ Static methods179.09%
▷ Public methods16487.70%
▷ Protected methods00.00%
▷ Private methods2312.30%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants24
▷ Global constants2395.83%
▷ Class constants14.17%
▷ Public constants1100.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/plugins/light-gallery/img/video-play.png4.42KB1.05KB▼ 76.27%
assets/plugins/light-gallery/img/youtube-play.png5.06KB2.37KB▼ 53.04%
assets/plugins/owl-carousel/assets/owl.video.play.png4.86KB2.74KB▼ 43.61%
assets/plugins/light-gallery/img/vimeo-play.png5.30KB1.56KB▼ 70.65%