Google Analytics by MonsterInsights
[Plugin: Google Analytics for WordPress] Coding issues and E_STRICT spam (1 post)

  1. Maik Penz
    Posted 4 years ago #

    Using PHP 5.3 or 5.4 will generate (tons of) log entries for invalid static access of non-static properties for GA_Filter.

    Quick fix: all methods of GA_Filter are *only* used in static context and should be declared with static public.

    Some minor issues:
    for googleanalytics.php
    line 24: plugin_dir_path( __FILE__ ) does add a trailing slash. Not needed to do so twice.

    line 1510: $gaf = new GA_Filter(); is not used by the plugin.
    There is no need for it, as the interface is static already.

    For consistence either omit all public in public function or always use it.

    If time permits I'll add a more complete coding review later this year (basic consistency, common error and performance checkup. maybe something about missing source documentation too).


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics by MonsterInsights
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic