4 Replies - 153 Views - Last Post: 02 February 2012 - 11:12 AM

Topic Sponsor:

#1 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 175
  • View blog
  • Posts: 1,505
  • Joined: 20-January 09

Site resource analyzation... anyone know?

Posted 01 February 2012 - 02:45 PM

Ok. So when I started a larger scale OOP project I, unfortunately didn't think of directory structure ( I know it sucks, had to learn that one the hard way ). Now I want to clean this up, does anyone know of a way to plugin a site and have it scroll the site and let you know what resources are being called on a given page? I know that there are broken links resources but most don't parse the dynamic pages to let you know what files are being included. Granted you can clean up jpg, images, and css files but I want to do this site wide, not one page at a time and I also want it to list dynamic files as well.

For example, let's say that you put in mysite.com it will come back with:

mysite.com
  • style.css
  • custom.js
  • functions.php
  • header.php
  • content.php
  • footer.php
  • images/header.jpg
  • images/logo.png
  • images/mainimage.png


mysite.com/about/
  • style.css
  • custom.js
  • functions.php
  • header.php
  • content.php
  • footer.php
  • images/header.jpg
  • images/logo.png
  • images/mainimage.png
  • images/me.jpg

This post has been edited by gregwhitworth: 01 February 2012 - 02:46 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Site resource analyzation... anyone know?

#2 Shane Hudson  Icon User is offline

  • D.I.C Technophile
  • member icon

Reputation: 326
  • View blog
  • Posts: 1,266
  • Joined: 06-December 09

Re: Site resource analyzation... anyone know?

Posted 01 February 2012 - 04:57 PM

I think http://www.acunetix.com/ might be able to do that (use the trial)... I used it more for finding all content on the server but I think you can make it look for resources.

I did some googling to no avail, but I expect you could make a plugin that uses web inspector or firebug and crawls the site, they both say what resources a page uses.
Was This Post Helpful? 1
  • +
  • -

#3 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 175
  • View blog
  • Posts: 1,505
  • Joined: 20-January 09

Re: Site resource analyzation... anyone know?

Posted 01 February 2012 - 06:34 PM

I did find that PHP has a built in get_included_files but it is pretty tasking on the server as I tried giving it my whole site. I may have to set it up to go directory by directory.

Thanks Shane.
Was This Post Helpful? 0
  • +
  • -

#4 revolutionx  Icon User is offline

  • D.I.C Head

Reputation: 57
  • View blog
  • Posts: 222
  • Joined: 23-July 09

Re: Site resource analyzation... anyone know?

Posted 02 February 2012 - 03:09 AM

Although this method is for individual pages:

One way would be to use Firebug (A Firefox plugin, although many modern browsers have their own inbuilt developer tools which offer the same Net feature).

Check the Net tab, and it will tell you all the GET request that page makes. You can see the status of that request. 200 OK means it can find the file, any missing files will be highlighted in red.

It will also tell you the time it took to make that get request so you can see if anything is slowing down the page load time.

This post has been edited by revolutionx: 02 February 2012 - 03:10 AM

Was This Post Helpful? 1
  • +
  • -

#5 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 175
  • View blog
  • Posts: 1,505
  • Joined: 20-January 09

Re: Site resource analyzation... anyone know?

Posted 02 February 2012 - 11:12 AM

@revolution

That's what I was trying to avoid. Also it doesn't show any discrepencies, such as files that you have that absolutely no page is calling. I think I will write a class that I can drop in that shows you files that not a single page in the site is referencing (php includes, scripts, links, etc).

Thanks for the thoughts guys.

Greg
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1