Open PanderMusubi opened 14 years ago
Fro wp-recaptcha version 2.9.6, this results in:
Hey Pander, thanks for this analysis. Would you be kind enough to run it on the new version, branch oo-refactor? I would appreiate it.
Hi Bleank,
What is the exact command to download that version. I'll run it and send you the results if you are going to incorporate it in your release procedure from then one ;)
Regards,
Pander
Sorry for the late response. If you used git to get the source, you can do git checkout remotes/origin/oo-refactor oo-refactor
. That should work. However, it's perhaps easiest to just download the source tree in an archive here.
Here it is, first the current prod version, then the new refactored version:
$ grep FILE -A 2 wp-recaptcha/phpcs.txt
FOUND 790 ERROR(S) AND 186 WARNING(S) AFFECTING 572 LINE(S)
$ grep FILE -A 2 blaenk-wp-recaptcha-5be1b86/phpcs.txt
FOUND 148 ERROR(S) AND 111 WARNING(S) AFFECTING 154 LINE(S)
So, please install phpcs and you can see the details for yourself and fix them. Good luck.
Ah, the layout was not intended like this, it is just the dashes that get intrerpretated by submitting via this form.
Please include the following automated inspection on the source code of this plugin.
PHP code style checking
phpcs wp-recaptcha>phpcs.txt
PHP dependancies and complexity checking
PHP_Depend/pdepend.php -d memory_limit=128M --bad-documentation --summary-xml=pdepend-summary.xml --phpunit-xml=pdepend-phpunit.xml --jdepend-chart=pdepend-jdepend.svg --overview-pyramid=pdepend-pyramid.svg wp-recaptcha
resulting images can be converted in this way
inkscape -z --file=pdepend-jdepend.svg --export-png=pdepend-jdepend.png inkscape -z --file=pdepend-pyramid.svg --export-png=pdepend-pyramid.png convert pdepend-jdepend.png pdepend-jdepend.jpg convert /pdepend-pyramid.png pdepend-pyramid.jpg
PHP mess detection for possible bugs, suboptimal code, overcomplicated expressions and unused parameters, methods, properties
php -d memory_limit=128M tools/phpmd/phpmd.php wp-recaptcha html codesize --reportfile phpmd.html
Subsequently, improve PHP code in order to minimise the errors and warnings reported by these three tools. Please implement this step in your standard release procedure.
Adhering to the industry standards or common practises as promoted by these tools will improve code quality and decrease the risk of bugs.