bug, bugs, bugs, do NOT use this plugin!
-
I am referencing version 1.0 of this plugin.
When you test your own plugin with the lowest warning level you can easily see, that it has several bugs in it.
1. the path to welcomescreen.txt (which is placed redundantly all over the code!!!) has an error or typo in it:
it says
'/wp-content/plugins/google-analytics-analyze-welcomescreen.txt'
but should say
'/wp-content/plugins/google-analytics-analyze/welcomescreen.txt'
2. To get the full path to that file you just use
$_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/google-analytics-analyze/welcomescreen.txt'
It is an illegit assumption to expect the file in this location. Maybe wp is not installed in “DOCUMENT_ROOT”.
Check this doc for how to obtain the path to your plugin:
https://codex.www.ads-software.com/Function_Reference/plugin_dir_path3.
fwrite
andfclose
on line 41 and 42 have to be right afterfopen
on line 40, not outside the curly brackets.4. User role exclusion tick boxes do not stay ticked.
5. in function
googleanalyticwiplugin_activate()
you forgot anfopen
statement entirely.6. The button “Add New Google Analytics Code” is not working as the js-file is referenced with the same path error like
welcomescreen.txt
.This plugin by no means is working. Except for that it is phoning home on activation and deactivation, sending admin email and site url. Maybe it is a honeypot or a trojan? I assume the 2 positive reviews are fake(both making a few comments in forums around the same time they reviewd this plugin, and doing nothing else). Don’t use it!
- The topic ‘bug, bugs, bugs, do NOT use this plugin!’ is closed to new replies.