Title: Code scanner/reviewer
Last modified: August 19, 2016

---

# Code scanner/reviewer

 *  [firstain](https://wordpress.org/support/users/firstain/)
 * (@firstain)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/code-scannerreviewer/)
 * Hi,
 * I’m making a new wordpress theme, my first ever, and i want to check my code 
   for errors. But there are far too many template files i have used and far too
   much coding in them to go through everything and check accurately.
 * So i want to know, is there a way, or a hack of sorts, that helps scan my entire
   code and notify me of any unclosed tags or any other errors that may be there?
 * I’d like to get through his step ‘accurately’ and ‘perfectly’ before proceeding
   to unleashing my theme to the world!
 * Any help will be appreciated!
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/code-scannerreviewer/#post-2008426)
 * [http://validator.w3.org/](http://validator.w3.org/)
    [http://jigsaw.w3.org/css-validator/](http://jigsaw.w3.org/css-validator/)
   [http://pross.org.uk/plugins/theme-check/](http://pross.org.uk/plugins/theme-check/)
 *  Thread Starter [firstain](https://wordpress.org/support/users/firstain/)
 * (@firstain)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/code-scannerreviewer/#post-2008488)
 * Thanks…
 * but W3 validator is showing this error for each and every .php file i upload:
 * > Sorry, I am unable to validate this document because its content type is application/
   > octet-stream, which is not currently supported by this service.
   >  The Content-
   > Type header is sent by your web server (or web browser if you use the file 
   > upload interface) and depends on its configuration. Commonly, web servers will
   > have a mapping of filename extensions (such as “.html”) to MIME Content-Type
   > values (such as text/html). That you received this message can mean that your
   > server is not configured correctly, that your file does not have the correct
   > filename extension, or that you are attempting to validate a file type that
   > we do not support yet. In the latter case you should let us know that you need
   > us to support that content type (please include all relevant details, including
   > the URL to the standards document defining the content type) using the instructions
   > on the Feedback Page.
 * For css file it replaced “application/octet-stream” with “text/css”
 * What could be the issue here?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/code-scannerreviewer/#post-2008501)
 * You validate the final html pages – not the .php files.
 *  Thread Starter [firstain](https://wordpress.org/support/users/firstain/)
 * (@firstain)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/code-scannerreviewer/#post-2008503)
 * Hi,
 * thanks for the reply again.
 * In the meanwhile, i tried the 3rd link you gave above (Plugin by Pross).
 * I ran that plugin and it gave me a plethora of warnings. Most of them were use
   of depreciated tags like:
 * It said:
 * Used: bloginfo(‘home’)
    Instead use: bloginfo(‘url’)
 * Something like those…
 * But the first one was something like this:
    WP_DEBUG is not enabled…enable it
   first..
 * What is that and how to do that? I referred the codex but couldn’t quite understand.
   Is it necessary?
 * And lastly, the warnings it gave…is there an automatic way to correct them or
   i’ll have to manually replace the depreciated tags on each and every file?
 * There were few ‘special characters’ also in my coding…should i remove them?
 *  Thread Starter [firstain](https://wordpress.org/support/users/firstain/)
 * (@firstain)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/code-scannerreviewer/#post-2008509)
 * Hi,
 * One of the suggestions for the plugin:
 * > RECOMMENDED: bloginfo(‘template_directory’) was found in the file xxx.php. 
   > Use get_template_directory_uri() instead.
 * I followed this recommendation and as a result my theme was messed up.
 * For example:
 * Previously it was this:
 * > <img src='<?php **bloginfo(‘template_directory’)**; ?>/images/feed.png’ alt
   > =’Subscribe to our R…
 * This showed the rss icon…
 * When i used this:
 * > <img src='<?php **get_template_directory_uri()**; ?>/images/feed.png’ alt=’
   > Subscribe to our R…
 * The rss icon wouldn’t show.
 * Whats the problem? Is the plugin suggesting me a wrong tag?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Code scanner/reviewer’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [scanner](https://wordpress.org/support/topic-tag/scanner/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 5 replies
 * 2 participants
 * Last reply from: [firstain](https://wordpress.org/support/users/firstain/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/code-scannerreviewer/#post-2008509)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
