[PEPr] Comment on HTML::MetaTags
| From: | Michael Gauthier | Date: | Tue, 01 Dec 2009 15:22:12 +0000 |
| Subject: | [PEPr] Comment on HTML::MetaTags | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-53079@lists.php.net to get a copy of this message | ||
This is a handy package. I've got some feedback:
1.) consisify between camelCase and under_scores. The camelCase style is
preferred.
2.) Document the available options in the class constructor in the method
docblock.
3.) documentation should use the 3rd person declarative rather than the
2nd person imperative in documentation. "Sets the foo" rather than "Set
foo". See http://pear.php.net/manual/en/standards.sample.php
4.) consistify between single quoted strings and double quoted.
Single-quoted is preferred.
5.) The regular expression has the punctuation characters hard-coded when
it appears you can specify them in the constructor.
6.) Lines should be at most 85 characters long.
7.) consider only using mb_strlen(), mb_strtolower(), etc if the functions
are avialable That way installations that don't have mb_string can still
use the package.
8.) stripText() could be simplified by using a regular expression.
9.) Package doesn't generate any HTML. I recommend renaming to
Text_Metadata or Text_MetaTags
10.) The use of the PHP license is discouraged. Consider BSD, Apache2 or
MIT instead.
11.) try running the code through phpcs (PHP_CodeSniffer)
12.) Min PHP version in package.xml is too low. At least PHP 5 is
required.
13.) This package is a great cantidate for unit testing. Consider adding
some tests to the proposal.
--
http://pear.php.net/pepr/pepr-proposal-show.php?id=618