SILENT KILLERPanel

Current Path: > home > codekrsu > > escapematrixonline.com > wp-content > plugins > koko-analytics > src > >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//escapematrixonline.com/wp-content/plugins/koko-analytics/src//

NameTypeSizeLast ModifiedActions
views Directory - -
backwards-compat.php File 370 bytes June 12 2025 11:44:36.
class-actions.php File 845 bytes February 10 2025 14:48:06.
class-admin-actions.php File 4609 bytes June 12 2025 11:44:36.
class-admin-bar.php File 713 bytes February 18 2025 13:13:36.
class-admin-page.php File 5425 bytes June 12 2025 11:44:36.
class-admin.php File 4019 bytes February 10 2025 14:48:06.
class-aggregator.php File 2952 bytes February 25 2025 13:03:20.
class-burst-importer.php File 11294 bytes June 13 2025 15:30:02.
class-chart-view.php File 5748 bytes June 12 2025 11:44:36.
class-command.php File 514 bytes April 15 2025 12:32:12.
class-dashboard-widget.php File 1548 bytes February 18 2025 13:13:36.
class-dashboard.php File 9510 bytes June 12 2025 11:44:36.
class-data-exporter.php File 3168 bytes February 18 2025 13:13:36.
class-data-importer.php File 2270 bytes February 18 2025 13:13:36.
class-endpoint-installer.php File 5526 bytes June 13 2025 10:27:30.
class-fingerprinter.php File 2279 bytes June 12 2025 11:44:36.
class-fmt.php File 1332 bytes February 18 2025 13:13:36.
class-jetpack-importer.php File 15592 bytes June 13 2025 15:30:02.
class-migrations.php File 2436 bytes January 17 2025 13:46:42.
class-notice-pro.php File 4591 bytes March 24 2025 11:30:04.
class-pageview-aggregator.php File 12890 bytes March 10 2025 11:31:16.
class-plugin.php File 1234 bytes June 12 2025 11:44:36.
class-pruner.php File 1460 bytes April 15 2025 12:32:12.
class-query-loop-block.php File 1533 bytes March 10 2025 11:31:16.
class-rest.php File 8271 bytes February 10 2025 14:48:06.
class-script-loader.php File 4741 bytes June 12 2025 11:44:36.
class-shortcode-most-viewed-posts.php File 1861 bytes February 25 2025 13:03:20.
class-shortcode-site-counter.php File 1727 bytes March 10 2025 11:31:16.
class-stats.php File 7099 bytes June 12 2025 11:44:36.
class-widget-most-viewed-posts.php File 5828 bytes February 10 2025 14:48:06.
collect-functions.php File 9907 bytes June 18 2025 21:02:18.
external-strings.php File 7144 bytes April 15 2025 12:32:12.
functions.php File 6447 bytes June 12 2025 11:44:36.
global-functions.php File 2521 bytes January 17 2025 13:46:42.
template-functions.php File 567 bytes February 18 2025 13:13:36.

Reading File: /home/codekrsu//escapematrixonline.com/wp-content/plugins/koko-analytics/src///class-chart-view.php

<?php

/**
 * @package koko-analytics
 * @license GPL-3.0+
 * @author Danny van Kooten
 */

namespace KokoAnalytics;

class Chart_View
{
    public function __construct(array $data, \DateTimeInterface $dateStart, \DateTimeInterface $dateEnd, int $height = 280, bool $showGroupOptions = true)
    {
        $n = count($data);
        $tick_width = $n > 0 ? 100.0 / (float) $n : 100.0;
        $y_max = 0;
        foreach ($data as $tick) {
            $y_max = max($y_max, $tick->pageviews);
        }
        $y_max_nice = $this->get_magnitude($y_max);
        $padding_top = 6;
        $padding_bottom = 24;
        $padding_left = 4 + strlen(number_format_i18n($y_max_nice)) * 8;
        $inner_height = $height - $padding_top - $padding_bottom;
        $height_modifier = $y_max_nice > 0 ? $inner_height / $y_max_nice : 1;
        $dateFormat = (string) get_option('date_format', 'Y-m-d');
        $daysDiff = abs($dateEnd->diff($dateStart)->days);
        $timezone = wp_timezone();
        ?>
        <div class="ka-chart">
            <?php if ($showGroupOptions && $daysDiff > 7) { ?>
            <div class="ka-chart-group-by">
                <?php esc_html_e('Group by', 'koko-analytics'); ?>
                <?php if ($daysDiff <= 365) { ?>
                    <a href="<?php echo esc_attr(add_query_arg(['group' => 'day'])); ?>"><?php esc_html_e('days', 'koko-analytics'); ?></a>
                <?php } ?>
                <a href="<?php echo esc_attr(add_query_arg(['group' => 'week'])); ?>"><?php esc_html_e('weeks', 'koko-analytics'); ?></a>
                <?php if ($daysDiff > 31) {
                    ?><a href="<?php echo esc_attr(add_query_arg(['group' => 'month'])); ?>"><?php esc_html_e('months', 'koko-analytics'); ?></a><?php
                } ?>
            </div>
            <?php } /* end show group options */ ?>
            <svg width="100%" height="<?php echo $height; ?>" id="ka-chart">
              <g class="axes-y" transform="translate(<?php echo $padding_left; ?>, <?php echo $padding_top; ?>)" text-anchor="end" data-padding="<?php echo $padding_left; ?>">
                <text x="0" y="<?php echo $inner_height; ?>" fill="#757575" dy="0.3em" >0</text>
                <text x="0" y="<?php echo $inner_height / 2; ?>" fill="#757575" dy="0.3em"><?php echo \number_format_i18n($y_max_nice / 2); ?></text>
                <text x="0" y="0" fill="#757575" dy="0.3em"><?php echo \number_format_i18n($y_max_nice); ?></text>
                <line stroke="#eee" x1="8" x2="100%" y1="<?php echo $inner_height; ?>" y2="<?php echo $inner_height; ?>"></line>
                <line stroke="#eee" x1="8" x2="100%" y1="<?php echo $inner_height / 2; ?>" y2="<?php echo $inner_height / 2; ?>"></line>
                <line stroke="#eee" x1="8" x2="100%" y1="0" y2="0"></line>
              </g>
              <g class="axes-x" text-anchor="start" transform="translate(0, <?php echo $inner_height + 4; ?>)">
                <text fill="#757575" x="<?php echo $padding_left; ?>" y="10" dy="1em" text-anchor="start"><?php echo \wp_date($dateFormat, $dateStart->getTimestamp()); ?></text>
                <text fill="#757575" x="100%" y="10" dy="1em" text-anchor="end"><?php echo \wp_date($dateFormat, $dateEnd->getTimestamp()); ?></text>
              </g>
               <g class="bars" transform="translate(0, <?php echo $padding_top; ?>)" style="display: none;">
                <?php foreach ($data as $tick) {
                    $dt = (new \DateTimeImmutable($tick->date, $timezone));
                    $is_weekend = (int) $dt->format('N') >= 6;
                    $class_attr = $is_weekend ? 'class="weekend" ' : '';
                    // data attributes are for the hover tooltip, which is handled in JS
                    echo '<g ', $class_attr, 'data-date="', \wp_date($dateFormat, $dt->getTimestamp()), '" data-pageviews="', \number_format_i18n($tick->pageviews), '" data-visitors="', \number_format_i18n($tick->visitors),'">';
                    echo '<rect class="ka--pageviews" width="0" height="', $tick->pageviews * $height_modifier,'" y="', ($inner_height - $tick->pageviews * $height_modifier),'"></rect>';
                    echo '<rect class="ka--visitors" width="0" height="', ($tick->visitors * $height_modifier), '" y="', ($inner_height - $tick->visitors * $height_modifier), '"></rect>';
                    echo '<line stroke="#ddd" y1="', $inner_height, '" y2="', ($inner_height + 6),'"></line>';
                    echo '</g>';
                } ?>
               </g>
            </svg>
            <div class="ka-chart--tooltip" style="display: none;">
                <div class="ka-chart--tooltip-box">
                  <div class="ka-chart--tooltip-heading"></div>
                  <div style="display: flex">
                    <div class="ka-chart--tooltip-content ka--visitors">
                      <div class="ka-chart--tooltip-amount"></div>
                      <div><?php esc_html_e('Visitors', 'koko-analytics'); ?></div>
                    </div>
                    <div class="ka-chart--tooltip-content ka--pageviews">
                      <div class="ka-chart--tooltip-amount"></div>
                      <div><?php esc_html_e('Pageviews', 'koko-analytics'); ?></div>
                    </div>
                  </div>
                </div>
                <div class="ka-chart--tooltip-arrow"></div>
            </div>
        </div><?php
    }

    private function get_magnitude(int $n): int
    {
        if ($n < 10) {
            return 10;
        }

        if ($n > 100000) {
            return (int) ceil($n / 10000.0) * 10000;
        }

        $e = floor(log10($n));
        $pow = pow(10, $e);
        return (int) (ceil($n / $pow) * $pow);
    }
}

SILENT KILLER Tool