Development with WordPress
During my first client project. I have gone through a deep code review by senior developers and I learned a lot from that.
here we Go …
As WordPress itself have a PHP base so Sometimes our search and development flow reach us to PHP code.
which is not bad at all to use PHP functions or sometimes to write core PHP code.
but we have to keep in mind there are many things already coded in WordPress.
so sometimes just one WordPress function call may reduce your lines of PHP code.
There are a lot of things. several functions which now I keep in my practice after I got the importance of them during code review.
- https://codex.wordpress.org/Function_Reference/selected instead of PHP code.
- https://codex.wordpress.org/Function_Reference/checked instead of PHP code.
- https://codex.wordpress.org/Function_Reference/submit_button instead of writing own submit button html code.
- https://developer.wordpress.org/reference/functions/wp_parse_url instead of parse_url.
- https://codex.wordpress.org/Function_Reference/wp_remote_get instead of CURL.
- https://codex.wordpress.org/Function_Reference/wp_remote_post instead of CURL with post method.
Code review is really important to learn new things or correct old mistakes. sometimes I call it more than code correction i.e knowledge sharing.
If this may possible then you can suggest your friend co-worker to be your peer reviewer. you could review his code to share knowledge at the same time. if you feel someone is more knowledgeful developer, then don’t ever miss the chance to get your code reviewed by that person.
you can learn a lot from this process ….