WPIntell

Source evidence

Widget has table names hardcoded

Events Calendar · support · 2014-02-03T18:05:00+00:00

complaintsentiment
mediumseverity
0.86relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 36 rows with source links

19.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Jiju Thomas Mathew unresolved
1. events-widget.php (line:53) has table prefix hardcoded, should use $wpdb->prefix instead of wp_. 2. The standard wrappers $before_widget, and $after_widget was not used along with an absolute positioning for the widget. 3. events.php (line: 49) the menu icon is assumed to be existing in the theme, better distribute the icon with the plugin and point it there using plugins_url I had corrected all these on my copy. https://wordpress.org/plugins/manags-events/ Found more bugs in the events-widget.php If have only single day events, those will not be displayed on the calendar widget. This is because the range will not satisfy. Modified the code in the events-widget.php function get_dates($start, $end) { $startDay = strtotime($start); $endDay = strtotime($end); $days = ($endDay - $startDay) / (60 * 60 * 24); $this->eventsData[] = date("m/d/Y", $startDay); for ($i = 1; $i <= $days; $i++) { $this->eventsData[] = date("m/d/Y", $startDay + ($i * 86400)); } } /*for php 5.3>*/ function get_dates_5($start,$end){ $begin = new DateTime( $start ); $end = new DateTime( $end ); $interval = DateInterval::createFromDateString('1 day'); $period = new DatePeriod($begin, $interval, $end); if(empty($period)){ $this->eventsData[]= $begin->format( "m/d/Y" ); }else{ foreach ( $period as $dt ){ $this->eventsData[]= $dt->format( "m/d/Y" ); } } } Hi Jiju Thomas Mathew Thanks for pointing the issues in plugin.Bugs are now fixed and new version is released with a new slider feature is added in the plugin

Comments

2 shown
Jiju Thomas Mathew 2014-02-03T18:17:00+00:00

Found more bugs in the events-widget.php If have only single day events, those will not be displayed on the calendar widget. This is because the range will not satisfy. Modified the code in the events-widget.php function get_dates($start, $end) { $startDay = strtotime($start); $endDay = strtotime($end); $days = ($endDay - $startDay) / (60 * 60 * 24); $this->eventsData[] = date("m/d/Y", $startDay); for ($i = 1; $i <= $days; $i++) { $this->eventsData[] = date("m/d/Y", $startDay + ($i * 86400)); } } /*for php 5.3>*/ function get_dates_5($start,$end){ $begin = new DateTime( $start ); $end = new DateTime( $end ); $interval = DateInterval::createFromDateString('1 day'); $period = new DatePeriod($begin, $interval, $end); if(empty($period)){ $this->eventsData[]= $begin->format( "m/d/Y" ); }else{ foreach ( $period as $dt ){ $this->eventsData[]= $dt->format( "m/d/Y" ); } } }

dianuj 2014-02-04T20:43:00+00:00

Hi Jiju Thomas Mathew Thanks for pointing the issues in plugin.Bugs are now fixed and new version is released with a new slider feature is added in the plugin