public function register_plugin_ajax()
 {
     $result = array();
     $result['status'] = 'success';
     $total = 0;
     foreach (ESSBSocialFansCounterUtils::enabled_socials() as $social) {
         $count = ESSBSocialFansCounterUtils::fans_count($social, false);
         $result['social'][$social]['count'] = $count;
         $result['social'][$social]['count_formated'] = ESSBSocialFansCounterUtils::format_count($count);
         $total += $count;
         $result['social']['total']['count'] = $total;
         $result['social']['total']['count_formated'] = ESSBSocialFansCounterUtils::format_count($total);
     }
     echo json_encode($result);
     exit;
 }
          <div class="clearfix"></div>
          <small class="<?php 
    echo $total_css_text_color_class;
    ?>
"><?php 
    _e($fans_total_text, ESSB3_TEXT_DOMAIN);
    ?>
</small>
        </div>
      </div>
    </div>
<?php 
}
?>
  <?php 
if (count(ESSBSocialFansCounterUtils::enabled_socials()) > 0 && $show_total && $show_numbers && $total_type == 'text' && $total_text_pos == 'bottom') {
    ?>
    <div  class="<?php 
    echo $css_total;
    ?>
" data-social="total">
      <div class="essbfc-front essbfc-total-astext">
          <span class="essbfc-total-astext-number"><?php 
    echo $fans_total;
    ?>
</span>
          <small class="essbfc-total-astext-text"><?php 
    _e($fans_total_text, ESSB3_TEXT_DOMAIN);
    ?>
</small>
        </div>
 public static function register_options($options)
 {
     self::$options = $options;
 }
 public function widget($args, $instance)
 {
     extract($args);
     $before_widget = $args['before_widget'];
     $before_title = $args['before_title'];
     $after_title = $args['after_title'];
     $after_widget = $args['after_widget'];
     $title = $instance['title'];
     // register current widget options
     ESSBSocialFansCounterUtils::register_options((array) $instance);
     include ESSB3_PLUGIN_ROOT . 'lib/modules/social-fans-counter/essb-social-fanscounter-widget-view.php';
 }
<?php

$show_title = ESSBSocialFansCounterUtils::show_title();
$box_width = ESSBSocialFansCounterUtils::box_width();
// widget columns count
$lazy_load = ESSBSocialFansCounterUtils::lazy_load();
$animate_numbers = ESSBSocialFansCounterUtils::animate_numbers();
$max_duration = ESSBSocialFansCounterUtils::animate_numbers();
$data = '';
if ($animate_numbers) {
    $data .= 'data-animate_numbers="1" ';
}
if ($lazy_load) {
    $data .= 'data-is_lazy="1" ';
}
if ($max_duration) {
    $data .= 'data-duration="' . $max_duration . '" ';
}
?>
<div class="essbfc-counter-container" style="<?php 
echo $box_width;
?>
">
  <?php 
if ($show_title) {
    ?>
    <h3><?php 
    echo $title;
    ?>
</h3>
  <?php