Title: Performance Improvement
Last modified: August 21, 2016

---

# Performance Improvement

 *  [Comparativa de Bancos](https://wordpress.org/support/users/antorome/)
 * (@antorome)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/performance-improvement-1/)
 * Hello
 * I have been checking the code and there are dozens of comparisons.
 * I believe you could improve a lot the performance by using `!==` instead of `!
   =` and double quotes instead of single quotes.
 * [http://maettig.com/code/php/php-performance-benchmarks.php](http://maettig.com/code/php/php-performance-benchmarks.php)
   
   [http://www.phpbench.com/](http://www.phpbench.com/)
 * Regards
 * [http://wordpress.org/plugins/custom-content-shortcode/](http://wordpress.org/plugins/custom-content-shortcode/)

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

 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/performance-improvement-1/#post-4474652)
 * Thank you very much for the suggestion, and such useful links. I’ll study the
   benchmarks to see how I can improve PHP performance. These points are good to
   know!
 * There is definitely room for improvement. When I have some time, I’ll set up 
   a benchmark test, and refactor the code based on the information you gave me.
   I’ll let you know how it goes, when I make the next update.
 *  Thread Starter [Comparativa de Bancos](https://wordpress.org/support/users/antorome/)
 * (@antorome)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/performance-improvement-1/#post-4474653)
 * Nice. Another thing I just noticed.
 * I am making my first tests with the plugin and this
    [loop type=”post” count=”
   3″ ][content][/loop]
 * In a current post with this example content
 * paragraph 1
    [loop type=”post” count=”3″ ][content][/loop] paragraph 2 paragraph
   3
 * The plugin is displaying the loop content at the end of paragraph3 and not in
   the middle.
 * May be you should add “do_shortcode($out)” when returning the content in the “
   content” shortcode.
 * BR
 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/performance-improvement-1/#post-4474655)
 * Hmm, that’s interesting about the content being displayed at the end.
 * The [content] shortcode executes shortcodes within the post content by default.
   The end of that function goes:
 *     ```
       if($shortcode_option != 'false') { // Shortcode?
       		$out = do_shortcode( $out );
       	}
   
       	return $out;
       }
   
       add_shortcode('content', 'custom_content_shortcode');
       ```
   
 * So, the issue must be somewhere else. Could it be with the CSS? Could it be how
   the [loop] shortcode displays the content..?
 * I’m not able to reproduce the issue – if you could let me see the page where 
   this is occurring, I might be able to figure out what’s going on.
 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/performance-improvement-1/#post-4474700)
 * One possibility I just thought of: if you’re using the code `[loop type="post"
   count="3"][content][/loop]` within a post, it could be trying to display the 
   post itself, i.e., an infinite loop.
 *  Thread Starter [Comparativa de Bancos](https://wordpress.org/support/users/antorome/)
 * (@antorome)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/performance-improvement-1/#post-4474768)
 * Hello
 * the `do_shortcode`function should be placed within the `loop`shortcode.
 * I.e. when you want that a shortcode correctly displays the content of a “child”
   shortcode you have to put the do_shortcode.
 * These are not your current functions but to explain it.
 *     ```
       function loop(){
       return do_shortcode( $content );
       }
       ```
   
 * BR
 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/performance-improvement-1/#post-4474771)
 * By default, the [loop] shortcode executes shortcodes within the content that 
   it wraps. There’s a line `$output[] = do_shortcode($this->...)` for each post/
   attachment/etc that it finds.
 * So, I think the issue you’re experiencing must have a different cause. Sorry 
   to hear that the plugin is not functioning as you expected. If you could let 
   me know more details about the context in which you’re using the shortcodes, 
   I might be able to figure out a solution.

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

The topic ‘Performance Improvement’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

## Tags

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

 * 6 replies
 * 2 participants
 * Last reply from: [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/performance-improvement-1/#post-4474771)
 * Status: not resolved