• Resolved bseddon

    (@bseddon)


    You’ve put a lot of effort into this plugin and it’s nice enough but the reason I’m going to stop using is that it always dumps into my log because there is almost no defensive coding.

    Almost anywhere that an array is used, there is no check that the index being accessed actually exists. Almost all accesses to $_GET or $_SERVER are unguarded which means there are a LOT of notices in my log.

    The straw that broke the camel’s back this morning is this one on line 27 of

    wp-statistics\includes\log\widgets\pages.php

    where the plugin expects to find a value for item $uri[3]. In my situation this index does not exist. The code checks to see if the element (if there is one) is equal to ” but the additional check isset($uri[3]) is missing. In this cause you can replace:

    $uri[3] == ''

    with

    empty($uri[3])

    which will perform both tests in one.

    My guess is these messages occur in my log because you run PHP set to not show notice messages. That’s great, these issues probably do not affect the output of the plugin. But since I want to make sure the plugins I create do not emit notice errors I run PHP to show them so I get to see all the notices emitted by WP Statistics as well.

    https://www.ads-software.com/plugins/wp-statistics/

Viewing 1 replies (of 1 total)
  • Plugin Contributor Greg Ross

    (@gregross)

    Thanks for the feedback.

    You are correct, showing notice messages is a very high level of logging in PHP and certainly isn’t a recommended configuration for a production server, which is why normal users do not see these log entries.

    We continue to work at improving WP Statistics and help with finding these kinds of issues is always appreciated.

Viewing 1 replies (of 1 total)
  • The topic ‘Not ready for prime time’ is closed to new replies.