Plugin Directory

Changeset 3753095


Ignore:
Timestamp:
10/18/2026 01:52:01 PM (2 days ago)
Author:
websentrysecurity
Message:

1.3.2: mark partial scans, stop partial grades triggering drop notices

Location:
websentry-security-monitor
Files:
7 edited
9 copied

Legend:

Unmodified
Added
Removed
  • websentry-security-monitor/tags/1.3.2/includes/ajax.php

    r3749500 r3753095  
    3030                'frequency'    => $data['frequency']    ?? 'daily',
    3131                'found'        => $data['found']        ?? false,
     32                // Kept so this response mirrors the status payload. The caller reloads the
     33                // page rather than re-rendering, so the widget reads it from PHP.
     34                'blocked_by'   => $data['blocked_by']   ?? null,
    3235        ) );
    3336}
  • websentry-security-monitor/tags/1.3.2/includes/api.php

    r3749500 r3753095  
    5858
    5959        // Store the grade in a persistent option so we can detect drops across cache cycles.
    60         if ( ! empty( $body['grade'] ) ) {
     60        //
     61        // A partial grade takes no part in this. A scan a firewall cut short is
     62        // scored on fewer checks, so it reads HIGHER than a complete one: letting it
     63        // become the baseline makes the next full scan look like a drop and shows the
     64        // admin a red notice about a decline that never happened. It is not compared
     65        // and it is not remembered — the last complete grade stays the baseline.
     66        if ( ! empty( $body['grade'] ) && empty( $body['blocked_by'] ) ) {
    6167                $prev = get_option( 'websentry_last_known_grade', '' );
    6268                $drop = get_option( 'websentry_grade_drop', array() );
  • websentry-security-monitor/tags/1.3.2/includes/widget.php

    r3749584 r3753095  
    132132        $changes      = isset( $data['changes'] ) && is_array( $data['changes'] ) ? $data['changes'] : null;
    133133        $is_paid      = websentry_plan_is_paid( $data['plan'] ?? 'free' );
     134        $blocked_by   = $data['blocked_by'] ?? null;
    134135
    135136        $grade_colours = array(
    … …  
    142143        $gc = $grade_colours[ $grade ] ?? array( 'bg' => '#f9fafb', 'text' => '#374151', 'border' => '#e5e7eb' );
    143144
     145        // No arrow against a partial grade. A scan a firewall cut short is scored on
     146        // fewer checks, so comparing it with a complete one points the arrow at
     147        // movement the site never had. The API withholds prev_grade in that case;
     148        // this is here so an older API response cannot reintroduce the arrow.
    144149        $trend = '';
    145         if ( $prev_grade && $prev_grade !== $grade ) {
     150        if ( ! $blocked_by && $prev_grade && $prev_grade !== $grade ) {
    146151                $trend = websentry_grade_rank( $grade ) < websentry_grade_rank( $prev_grade ) ? '↑' : '↓';
    147152        }
    … …  
    206211                        </div>
    207212                </div>
     213
     214                <?php if ( $blocked_by ) : ?>
     215                        <!-- The grade above was measured through a firewall, so it covers only
     216                             the checks that got through. Said here because the widget shows a
     217                             letter with no report around it to qualify it. -->
     218                        <div style="padding:10px 12px;margin-bottom:14px;background:#fffbeb;border-left:3px solid #f59e0b;border-radius:4px;">
     219                                <strong style="display:block;color:#92400e;font-size:13px;margin-bottom:2px;">
     220                                        <?php
     221                                        printf(
     222                                                /* translators: %s: the bot protection vendor, such as Cloudflare. */
     223                                                esc_html__( 'Partial scan — %s blocked some checks', 'websentry-security-monitor' ),
     224                                                esc_html( $blocked_by )
     225                                        );
     226                                        ?>
     227                                </strong>
     228                                <span style="color:#78350f;font-size:12px;line-height:1.5;">
     229                                        <?php
     230                                        echo wp_kses(
     231                                                sprintf(
     232                                                        /* translators: %s: the address of the WebSentry bot allowlist guide. */
     233                                                        __( 'This grade only covers what we could reach, so the real grade may be lower. <a href="%s" target="_blank" rel="noopener">Allow WebSentry</a> through your firewall for a complete result.', 'websentry-security-monitor' ),
     234                                                        esc_url( 'https://websentry.dev/bot' )
     235                                                ),
     236                                                array( 'a' => array( 'href' => array(), 'target' => array(), 'rel' => array() ) )
     237                                        );
     238                                        ?>
     239                                </span>
     240                        </div>
     241                <?php endif; ?>
    208242
    209243                <?php websentry_widget_changes( $changes, $is_paid ); ?>
  • websentry-security-monitor/tags/1.3.2/readme.txt

    r3749584 r3753095  
    44Requires at least: 6.0
    55Tested up to: 7.1
    6 Stable tag: 1.3.1
     6Stable tag: 1.3.2
    77Requires PHP: 7.4
    88License: GPLv2 or later
    … …  
    8484== External services ==
    8585
    86 This plugin connects to the WebSentry API, run by AXOX Web Solutions, to fetch your site's security grade and to check the site when you ask. It is needed for everything the plugin shows.
     86This plugin connects to the WebSentry API to fetch your site's security grade and to check the site when you ask. It is needed for everything the plugin shows.
    8787
    8888* **What is sent:** your WebSentry API key and your site's address.
    … …  
    9999
    100100== Changelog ==
     101
     102= 1.3.2 =
     103* The widget says when a grade came from a partial scan. If bot protection blocks our checks, the grade only covers what we could reach, so the widget now names the firewall and links to the fix instead of showing the letter on its own.
     104* Fixed: a partial grade no longer counts as a change. A blocked scan is measured on fewer checks, so it scores higher than a complete one — it was becoming the baseline, which made the next full scan look like a drop and showed a decline notice for something that never happened. Partial grades are no longer compared or remembered, and no trend arrow is drawn against one.
    101105
    102106= 1.3.1 =
  • websentry-security-monitor/tags/1.3.2/websentry-security-monitor.php

    r3749584 r3753095  
    44 * Plugin URI:        https://websentry.dev/wordpress
    55 * Description:       Displays your site's WebSentry security grade and monitoring status right in the WordPress admin dashboard.
    6  * Version:           1.3.1
     6 * Version:           1.3.2
    77 * Author:            AXOX Web Solutions
    88 * Author URI:        https://axoxweb.com
  • websentry-security-monitor/trunk/includes/ajax.php

    r3749500 r3753095  
    3030                'frequency'    => $data['frequency']    ?? 'daily',
    3131                'found'        => $data['found']        ?? false,
     32                // Kept so this response mirrors the status payload. The caller reloads the
     33                // page rather than re-rendering, so the widget reads it from PHP.
     34                'blocked_by'   => $data['blocked_by']   ?? null,
    3235        ) );
    3336}
  • websentry-security-monitor/trunk/includes/api.php

    r3749500 r3753095  
    5858
    5959        // Store the grade in a persistent option so we can detect drops across cache cycles.
    60         if ( ! empty( $body['grade'] ) ) {
     60        //
     61        // A partial grade takes no part in this. A scan a firewall cut short is
     62        // scored on fewer checks, so it reads HIGHER than a complete one: letting it
     63        // become the baseline makes the next full scan look like a drop and shows the
     64        // admin a red notice about a decline that never happened. It is not compared
     65        // and it is not remembered — the last complete grade stays the baseline.
     66        if ( ! empty( $body['grade'] ) && empty( $body['blocked_by'] ) ) {
    6167                $prev = get_option( 'websentry_last_known_grade', '' );
    6268                $drop = get_option( 'websentry_grade_drop', array() );
  • websentry-security-monitor/trunk/includes/widget.php

    r3749584 r3753095  
    132132        $changes      = isset( $data['changes'] ) && is_array( $data['changes'] ) ? $data['changes'] : null;
    133133        $is_paid      = websentry_plan_is_paid( $data['plan'] ?? 'free' );
     134        $blocked_by   = $data['blocked_by'] ?? null;
    134135
    135136        $grade_colours = array(
    … …  
    142143        $gc = $grade_colours[ $grade ] ?? array( 'bg' => '#f9fafb', 'text' => '#374151', 'border' => '#e5e7eb' );
    143144
     145        // No arrow against a partial grade. A scan a firewall cut short is scored on
     146        // fewer checks, so comparing it with a complete one points the arrow at
     147        // movement the site never had. The API withholds prev_grade in that case;
     148        // this is here so an older API response cannot reintroduce the arrow.
    144149        $trend = '';
    145         if ( $prev_grade && $prev_grade !== $grade ) {
     150        if ( ! $blocked_by && $prev_grade && $prev_grade !== $grade ) {
    146151                $trend = websentry_grade_rank( $grade ) < websentry_grade_rank( $prev_grade ) ? '↑' : '↓';
    147152        }
    … …  
    206211                        </div>
    207212                </div>
     213
     214                <?php if ( $blocked_by ) : ?>
     215                        <!-- The grade above was measured through a firewall, so it covers only
     216                             the checks that got through. Said here because the widget shows a
     217                             letter with no report around it to qualify it. -->
     218                        <div style="padding:10px 12px;margin-bottom:14px;background:#fffbeb;border-left:3px solid #f59e0b;border-radius:4px;">
     219                                <strong style="display:block;color:#92400e;font-size:13px;margin-bottom:2px;">
     220                                        <?php
     221                                        printf(
     222                                                /* translators: %s: the bot protection vendor, such as Cloudflare. */
     223                                                esc_html__( 'Partial scan — %s blocked some checks', 'websentry-security-monitor' ),
     224                                                esc_html( $blocked_by )
     225                                        );
     226                                        ?>
     227                                </strong>
     228                                <span style="color:#78350f;font-size:12px;line-height:1.5;">
     229                                        <?php
     230                                        echo wp_kses(
     231                                                sprintf(
     232                                                        /* translators: %s: the address of the WebSentry bot allowlist guide. */
     233                                                        __( 'This grade only covers what we could reach, so the real grade may be lower. <a href="%s" target="_blank" rel="noopener">Allow WebSentry</a> through your firewall for a complete result.', 'websentry-security-monitor' ),
     234                                                        esc_url( 'https://websentry.dev/bot' )
     235                                                ),
     236                                                array( 'a' => array( 'href' => array(), 'target' => array(), 'rel' => array() ) )
     237                                        );
     238                                        ?>
     239                                </span>
     240                        </div>
     241                <?php endif; ?>
    208242
    209243                <?php websentry_widget_changes( $changes, $is_paid ); ?>
  • websentry-security-monitor/trunk/readme.txt

    r3749584 r3753095  
    44Requires at least: 6.0
    55Tested up to: 7.1
    6 Stable tag: 1.3.1
     6Stable tag: 1.3.2
    77Requires PHP: 7.4
    88License: GPLv2 or later
    … …  
    8484== External services ==
    8585
    86 This plugin connects to the WebSentry API, run by AXOX Web Solutions, to fetch your site's security grade and to check the site when you ask. It is needed for everything the plugin shows.
     86This plugin connects to the WebSentry API to fetch your site's security grade and to check the site when you ask. It is needed for everything the plugin shows.
    8787
    8888* **What is sent:** your WebSentry API key and your site's address.
    … …  
    9999
    100100== Changelog ==
     101
     102= 1.3.2 =
     103* The widget says when a grade came from a partial scan. If bot protection blocks our checks, the grade only covers what we could reach, so the widget now names the firewall and links to the fix instead of showing the letter on its own.
     104* Fixed: a partial grade no longer counts as a change. A blocked scan is measured on fewer checks, so it scores higher than a complete one — it was becoming the baseline, which made the next full scan look like a drop and showed a decline notice for something that never happened. Partial grades are no longer compared or remembered, and no trend arrow is drawn against one.
    101105
    102106= 1.3.1 =
  • websentry-security-monitor/trunk/websentry-security-monitor.php

    r3749584 r3753095  
    44 * Plugin URI:        https://websentry.dev/wordpress
    55 * Description:       Displays your site's WebSentry security grade and monitoring status right in the WordPress admin dashboard.
    6  * Version:           1.3.1
     6 * Version:           1.3.2
    77 * Author:            AXOX Web Solutions
    88 * Author URI:        https://axoxweb.com
Note: See TracChangeset for help on using the changeset viewer.