84% comment-form-validation

Code Review | Comment Form Validation

WordPress plugin Comment Form Validation scored84%from 54 tests.

About plugin

  • Plugin page: comment-form-vali...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Dec 19, 2016
  • Latest release: Sep 1, 2020
  • Number of updates: 15
  • Update frequency: every 89.9 days
  • Top authors: Abhay Raj (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /4,070 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.71ms] Passed 4 tests

A check of server-side resources used by Comment Form Validation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.91 ▼2.29
Dashboard /wp-admin3.31 ▲0.0151.36 ▲1.57
Posts /wp-admin/edit.php3.36 ▲0.0146.50 ▼7.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.51 ▼7.90
Media Library /wp-admin/upload.php3.23 ▲0.0133.98 ▼5.39

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Comment Form Validation
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15213.50 ▼1.029.53 ▲7.7541.72 ▼1.49
Dashboard /wp-admin2,213 ▲395.71 ▲0.1899.38 ▲4.4143.02 ▲0.58
Posts /wp-admin/edit.php2,115 ▲122.06 ▼0.0836.47 ▼1.6234.15 ▼0.30
Add New Post /wp-admin/post-new.php1,541 ▲1517.95 ▼5.72652.43 ▼24.8378.60 ▲23.25
Media Library /wp-admin/upload.php1,415 ▲124.22 ▲0.1095.87 ▼23.6040.93 ▼8.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at 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/comment-form-validation/comment-form-validation.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #1 (screenshot-1.jpg) image missing
You can look at the official readme.txt

comment-form-validation/comment-form-validation.php Passed 13 tests

The main file in "Comment Form Validation" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
104 characters long description:
This plugin use for wordpress comments validation to the comment form. only need to activate the plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,180 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22211611,171
PHP12108
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin