Very bad plugin full of bugs
-
It is unbelievable that someone can publish a plugin with such low code quality and with so many bugs. From user’s perspective it may seem to work but just enable debugging in your wordpress and I guaranty you will get a full log of errors from this plugin. Some examples are:
- In function kc_social_share it starts with:
global $posts;
and there is no global variable $posts, there is only global variable $post which it then uses in the following code where its value is undefined - In function get_image_in_post_content it uses preg_match to find image in a post and without checking if anything was found it uses $matches[1][0]
- In function get_image_from_post_thumbnail it does something like:
if (someCondition) { $image = $something; } return $image[0];
How can it return first index from something that might not have been initialized?
- In function function get_image_from_attachments it uses does something like:
$children = get_children(...); $image = wp_get_attachment_image_src( $children[0], 'thumbnail');
But since get_children is returning associative array of (postID => data) you can’t use $children[0] on the next line.
- In function kc_social_share it starts with:
- The topic ‘Very bad plugin full of bugs’ is closed to new replies.