84% javascript-comment-form-protection

Code Review | Javascript Comment Form Protection

WordPress plugin Javascript Comment Form Protection scored 84% from 54 tests.

About plugin

  • Plugin page: javascript-commen...
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.6
  • WordPress version: 6.3.1
  • First release: Oct 12, 2018
  • Latest release: Oct 14, 2018
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: 3zero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,037 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.18MB] [CPU: ▼11.71ms] Passed 4 tests

A check of server-side resources used by Javascript Comment Form Protection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.6121.19 ▼22.86
Dashboard /wp-admin3.33 ▲0.0245.07 ▼5.16
Posts /wp-admin/edit.php3.19 ▼0.1631.94 ▼19.62
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.43 ▲2.45
Media Library /wp-admin/upload.php3.25 ▲0.0234.26 ▲0.81
Comment Form Protection Password /wp-admin/options-general.php?page=functions3.2229.52

Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
recovery_mode_email_last_sent
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Javascript Comment Form Protection
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,460 ▼29714.44 ▲0.020.52 ▼1.5518.70 ▼34.15
Dashboard /wp-admin2,213 ▲284.88 ▼0.96100.98 ▼17.5138.75 ▼8.40
Posts /wp-admin/edit.php45 ▼2,0410.44 ▼1.560.06 ▼39.069.98 ▼26.49
Add New Post /wp-admin/post-new.php1,525 ▲12723.35 ▲5.46604.89 ▼11.5158.50 ▲4.41
Media Library /wp-admin/upload.php1,395 ▲74.24 ▲0.0992.58 ▼11.6941.95 ▼1.10
Comment Form Protection Password /wp-admin/options-general.php?page=functions7802.0324.1824.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/javascript-comment-form-protection/javascript-comment-form-protection.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: comment form protection, form protection, stop bots, comment protection, stop comment spam...

javascript-comment-form-protection/javascript-comment-form-protection.php Passed 13 tests

The main file in "Javascript Comment Form Protection" v. 0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
102 characters long description:
Simple script to stop automated bots filling out comments now with password protection and encryption.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected91 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1351191

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin