74% sugar-calendar-lite

Code Review | Simple Event Management – Sugar Calendar (Lite)

WordPress plugin Simple Event Management – Sugar Calendar (Lite) scored74%from 54 tests.

About plugin

  • Plugin page: sugar-calendar-lite
  • Plugin version: 2.2.4
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 6.3.1
  • First release: Oct 5, 2012
  • Latest release: Aug 31, 2021
  • Number of updates: 96
  • Update frequency: every 33.9 days
  • Top authors: johnjamesjacoby (64.58%)BrashRebel (19.79%)mordauk (17.71%)

Code review

54 tests

User reviews

14 reviews

Install metrics

2,000+ active /94,975 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲3.26MB] [CPU: ▲15.25ms] Passed 4 tests

Analyzing server-side resources used by Simple Event Management – Sugar Calendar (Lite)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.79 ▲2.3353.63 ▲16.10
Dashboard /wp-admin6.91 ▲3.6166.85 ▲20.60
Posts /wp-admin/edit.php6.97 ▲3.6188.50 ▲46.91
Add New Post /wp-admin/post-new.php9.44 ▲3.55100.91 ▼2.55
Media Library /wp-admin/upload.php6.77 ▲3.5460.98 ▲26.85
Calendar /wp-admin/admin.php?page=sugar-calendar6.9562.90
Settings /wp-admin/admin.php?page=sc-settings6.7654.24
Sugar Calendar Upgrade /wp-admin/admin.php?page=sc-upgrades6.7449.64
Add New /wp-admin/post-new.php?post_type=sc_event7.0075.85

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 124 new files
Database: 2 new tables, 14 new options
New tables
wp_sc_eventmeta
wp_sc_events
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
wpdb_sc_events_version
widget_theysaidso_widget
wpdb_sc_eventmeta_version
widget_sc_calendar_widget
theysaidso_admin_options
widget_sc_event_list_widget
widget_sc_category_widget
...

Browser metrics Passed 4 tests

A check of browser resources used by Simple Event Management – Sugar Calendar (Lite)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.33 ▼1.051.80 ▲0.1937.94 ▼3.47
Dashboard /wp-admin2,239 ▲474.87 ▼0.11111.71 ▼11.3642.41 ▼4.69
Posts /wp-admin/edit.php2,125 ▲332.05 ▲0.0539.17 ▲0.1037.55 ▲1.27
Add New Post /wp-admin/post-new.php1,543 ▲2323.28 ▲0.28633.27 ▼36.8965.64 ▲5.72
Media Library /wp-admin/upload.php1,424 ▲394.22 ▲0.0396.02 ▼29.0544.68 ▼6.02
Calendar /wp-admin/admin.php?page=sugar-calendar2,3542.6453.1250.81
Settings /wp-admin/admin.php?page=sc-settings2,2832.1545.4233.13
Sugar Calendar Upgrade /wp-admin/admin.php?page=sc-upgrades3,1203.3955.9938.45
Add New /wp-admin/post-new.php?post_type=sc_event3,6257.56191.4869.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_sc_events
    • wp_sc_eventmeta
  • Zombie WordPress options detected upon uninstall: 14 options
    • sc_completed_upgrades
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • wpdb_sc_eventmeta_version
    • theysaidso_admin_options
    • widget_sc_category_widget
    • widget_sc_calendar_widget
    • widget_recent-posts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sugar-calendar-lite/sugar-calendar/includes/themes/legacy/widgets.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: Please take inspiration from this readme.txt

sugar-calendar-lite/sugar-calendar-lite.php 92% from 13 tests

"Simple Event Management – Sugar Calendar (Lite)" version 2.2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • 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 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
Good job! No executable or dangerous file extensions detected22,745 lines of code in 122 files:
LanguageFilesBlank linesComment linesLines of code
PHP736,27014,22015,753
CSS378313676,460
JavaScript10166183530
SVG2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity46.46
▷ Minimum class complexity1.00
▷ Maximum class complexity334.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces23
Interfaces0
Traits1
Classes34
▷ Abstract classes12.94%
▷ Concrete classes3397.06%
▷ Final classes1030.30%
Methods585
▷ Static methods81.37%
▷ Public methods21236.24%
▷ Protected methods21737.09%
▷ Private methods15626.67%
Functions292
▷ Named functions29099.32%
▷ Anonymous functions20.68%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin