最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - How to quicklyeasily make an analysis (reverse engineering) of Wordpress?

programmeradmin1浏览0评论

For me WordPress is totally unknown. I would like to know what tools and techniques do you use to analyze unknown code of Wordpress. If more specifically that for the following tasks:

1. To locate the file (s) html template layout of the output to the browser.
2. Identifying the mechanism of routing on the URL that is both on the basis of the URL, the system determines which content and form in which to display or put in short - a mechanism controller in the pattern of MVC.
3. Identifying the mechanism of the assembly of the main content of the modules, and work with a database that is everything for which usually must meet model in the pattern of MVC.
4. Determination of the mechanism of assembly of the entire html page before. That is, view in the pattern of MVC.

For example, for me, it's probably become traditional: Xdebug, IDE for PHP (Eclipse). Also a very special service helps to visualize the trace files Xdebug - Recognizer. It is good because it builds a comfortable working sequence diagram of a trace log. Maybe enough for someone to read documentation, view the source code or running in the debugger, but for me chart tracing helps to form in my head for the system and has become a really convenient way of analysis.

What else can you advice? Encourage effective tools and techniques for quick/easy analysis (reverse engineering)?

For me WordPress is totally unknown. I would like to know what tools and techniques do you use to analyze unknown code of Wordpress. If more specifically that for the following tasks:

1. To locate the file (s) html template layout of the output to the browser.
2. Identifying the mechanism of routing on the URL that is both on the basis of the URL, the system determines which content and form in which to display or put in short - a mechanism controller in the pattern of MVC.
3. Identifying the mechanism of the assembly of the main content of the modules, and work with a database that is everything for which usually must meet model in the pattern of MVC.
4. Determination of the mechanism of assembly of the entire html page before. That is, view in the pattern of MVC.

For example, for me, it's probably become traditional: Xdebug, IDE for PHP (Eclipse). Also a very special service helps to visualize the trace files Xdebug - Recognizer. It is good because it builds a comfortable working sequence diagram of a trace log. Maybe enough for someone to read documentation, view the source code or running in the debugger, but for me chart tracing helps to form in my head for the system and has become a really convenient way of analysis.

What else can you advice? Encourage effective tools and techniques for quick/easy analysis (reverse engineering)?

Share Improve this question edited Nov 30, 2019 at 17:55 prosti 4,3234 gold badges26 silver badges45 bronze badges asked Jul 24, 2013 at 10:50 KattletKattlet 111 bronze badge 3
  • Are you affiliated with Recognizer product? All your activity network-wide seems to be focused on creating mentions for it. – Rarst Commented Jul 25, 2013 at 13:49
  • No, I just want to know how other developers analyze code sharing my experience, and learn the experience of others ... – Kattlet Commented Jul 25, 2013 at 14:22
  • I really appreciate this question, for me this is a right mindset developers should have. – prosti Commented Nov 30, 2019 at 17:48
Add a comment  | 

2 Answers 2

Reset to default 1

The best way to understand wordpress is to work with it and then use the Wordpress CODEX to understand core functions.

That said there are a few tools that many Wordpress Developers use:

  1. A code editor with search and find functionality that will traverse all the files in your installation. I use Coda. Almost any good IDE will provide this.
  2. Plugins that provide further information: Developer , Debug Bar , Debug Bar Extender , There are many more, but I use these on every project.
  3. URL routing is accomplished through URL variables or Permalinks, most devs use Permalinks. The Template Hierarchy page will help you understand which template files are chosen and why.
  4. Wordpress is not architected in the strict MVC pattern. That said many of the Classes and Functions do follow the MVC pattern. The template hierarchy is equivalent to Views, but not very strictly followed. More on that here.
  5. The Database structure can be found here.

Final Notes: You've asked some questions above that have no answers because Wordpress is not a strict MVC patterned architecture. I use the Debug Bar and Debug Bar Extender to trace variables and know what template file is producing what browser output. it is an addon to the Wordpress Admin Bar, which provides a quick way to get to the backend from any front end section. I encourage you to turn that on for your user profile on the front end so you can quickly flip back and forth between the front and back.

hope that helps!

I would like to know what tools and techniques do you use to analyze unknown code of WordPress.

For the PHP WordPress code I used RIPS tool.

It is a product, but you can find the open source version.

发布评论

评论列表(0)

  1. 暂无评论