A bug, a fix and a suggestion

6 months ago | weboholic (Member) | |

Hi,

I've posted a bug as comment on the website, then I fixed it and wanted to post the solution and then I sow the links to the forum and the tracker :)

Here is the bug:
What are the chances that it's cont compatible with WP 2.5? When I try to create a new redirect, I get a success - the new row in the list is created. But when I check the DB - there's no entry made.

Here is the fix:
OK, I've fixed it. Here is the error msg:

Incorrect integer value: '' for column 'regex' at row 1

which led me to the problem. It might not have been a WP 2.5 issue but with mysql 5.0.51a. I had to remove surrounding single quotes on $red->regex in the query on line 144, so it works now.

And here is the suggestion I would like to make:
However I would like to point you to a little design change that you might want to consider: the plugin is using an int data type column for storing a boolean value. This is a huge space waste. An INT data type reserves 4 bytes for each row, while a TINYINT only 1 byte and this is the smallest you can get. Well 75% improvement is pretty good. This will also speed up querying the table which is important if you have a lot of redirects like me :)

I haven't studied the whole plugin, nor do I intend to, so this next remark might not fit at all. It just seems to me that the column position is redundant with the column id.

This a live saving plugin.
Greetings
Nikola

Read responses...

Responses

  1. John:

    Posted 1 month ago by Key Master

    Thanks Nikola

Reply

You must log in to post.

Home | Software | Terms & Conditions | Sitemap | John Godley © 2008