Support » Plugins » [Plugin: WordPress File Monitor] Why is a PHP stylesheet linked in every (public) page of my site?

  • Hi there

    Why is this line of code in every public page of my site…!!??
    <link rel=’stylesheet’ id=’msw_wpfm_scan-css’ href=’/wp-content/plugins/wordpress-file-monitor/wordpress-file-monitor.php?ver=scan’ type=’text/css’ media=” />

    Is this to run the cron only? Surely it would be sufficient to only add that on admin pages, not public pages too? Or is it related to how long the scan takes => adding in the Admin section means a chance that it hasn’t finished running when the user goes to view the report?

    Either way, I’d think that this should at least be a controllable option. For the moment, I’ve edited the plugin so that code only shows up in the Admin section, not the public pages.

    http://wordpress.org/extend/plugins/wordpress-file-monitor/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Matt Jensen

    (@ultrawebsites)

    Oh and by the way, the plug site is down at the moment http://mattwalters.net/projects/wordpress-file-monitor/

    It’s included as a CSS include so that your site can continue to load while the scan takes place. Had I made it just run on a standard hook it could have caused your site to pause loading for a visitor while the scan was processed.

    It’s not admin only because many users don’t visit their admin on a common basis. For instance, I can sometimes go a week or more without logging into my administration area, but I still want to be notified in a timely fashion if one of the files on my site were to be modified.

    Thanks for the feature suggestion about making it configurable to be only run in the administration area, I’ll give it consideration. However I will mention that if this is a concern for you, you could set the cron to zero and just run it manually at your choosing. It wouldn’t stop it from being included on the visitor facing side (pretty sure it wouldn’t, I’d need to go back and look at my code), but it would prevent a potentially slow loading element. I’ll definitely add it in so that if the cron is set to zero then the include doesn’t happen if it’s not that way already.

    And yeah, I was switching my site to a dedicated IP and DNS was messed up for a little bit because I forgot to change an A record. It’s straightened out now.

    Thread Starter Matt Jensen

    (@ultrawebsites)

    Cheers 🙂

    Thread Starter Matt Jensen

    (@ultrawebsites)

    I still think this is wrong. The code should use a WordPress WP-Cron job, such as wp_schedule_event, to schedule the job rather than loading the php file every time. Among other things, on SSL sites, it means that a non-HTTPS file is loaded and thus the browser doesn’t consider the whole page to be secure.

    It’s a great plugin otherwise, cheers.
    Matt

    This plugin is just what I want but there are a few issues with it that have forced me to deactive this plugin.

    I dont like the stylesheet hooked into the header of all pages. Surely there is a way of disabling this and using wordpress cron? If using wordpress cron causes a slow load for a visitor how about allowing the plugin to be configured using a cron on the server? For example configure server cron to run plugin php file to the shedule choosen.

    With the above I could live with the stylesheet embeded but because I use SSL this stylesheet isnt https so causes issues. This has already been mentioned…

    Also you have the ability to exclude directories but not files? If I have a file in the root that changes all the time I have no way of excluding it 🙁

    Other than those issues the plugin works really well. I’ll be keeping an eye on the development and I hope in future I can use it.

    Keep up the good work.

    Scott

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WordPress File Monitor] Why is a PHP stylesheet linked in every (public) page of my site?’ is closed to new replies.