OVERVIEW | SETUP | USER GUIDE | DOWNLOAD | TODO | NEWS | FAQ | FORUM | MAILING LIST | SUPPORT


FORUM  

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Quality of Code
Posted by: jordan (---.ibl.bm)
Date: July 27, 2004 11:13PM

I am a PHP programmer and have noticed several SIGNIFICANT inefficiencies in your code. Mainly, you connect, then disconnect, to the database in EVERY function that needs the database. It is MUCH better to connect at the top of the script then disconnect at the bottom.

Secondly, you suppressed the mysql errors. i can see why you may want to do this BUT it is a pain the fucking ass when a table does not exist and the only error you get is: "SQL Query Impossible".. what the @!#$ is that all about?

You also do not have ANY options for onl displayng unique visitors. I have created a pretty significant mod that adds an argument to all of the functions that select from the database, and have made a new file: index_unique.php that only displays the unique IPs (SELECT DISTINCT address, etc etc...).

Also, your code is not commented at all?!? and although your functions are named in english, your variables are in French! This only allows someone who is bilingual to understand your code properly. Someone who knows english cannot understand the variables, and someone who is french cannot understand the function calls/names.

So, what are you doing to address these issues? I am considering revamping your package and essentially creating my own, based on some o the ideas you have, but including none of your code.

Also, your table structure is pretty much crap also, the tables grows HUGE very quickly, especially on larger sites. You should simplify the user-agent right away, or give them IDs so that a lot less information can be stored in the database. You could also save space by converting the IPs to base-64 encoded.

-Jordan

Re: Quality of Code
Posted by: duncane (---.turboadsl.nordnet.fr)
Date: May 27, 2006 08:13AM

I'm not a ezBOO dev, but i noticed same points, and therefore, i'm writing a new stats tools, witch will also be used as visit counter for the visitor.

There's, I think, good ideas in the work ezBOO team done, and i think you have the good behavior to point out the weakness of this.

N.B. : excuse my poor english, but i'm french, and i do not practice english as much as i want tongue sticking out smiley

Re: Quality of Code
Posted by: Beloop (Moderator)
Date: May 29, 2006 01:51AM

As an ezboo webstats programmer, I just want to remind you that this script has been created in 2000, so a lot of concepts are quite old and especially the database design that is difficult to modify afterward.
Concerning the unique visitor features, do not forget that unique IP is totally different than unique visitor. This feature is already developed but not yet implemented. For the comments and the errors reporting I agree that this should be improved in the future...

Beloop



Sorry, only registered users may post in this forum.

Contact