84% comment-form-validation-and-customization

Code Review | Comment form validation and Customization

WordPress plugin Comment form validation and Customization scored84%from 54 tests.

About plugin

  • Plugin page: comment-form-vali...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2022
  • Latest release: Sep 16, 2023
  • Number of updates: 3
  • Update frequency: every 124.3 days
  • Top authors: thechetanvaghela (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /289 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.35ms] Passed 4 tests

Analyzing server-side resources used by Comment form validation and Customization
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.33 ▼10.72
Dashboard /wp-admin3.39 ▲0.0862.35 ▲7.92
Posts /wp-admin/edit.php3.50 ▲0.1450.17 ▲0.97
Add New Post /wp-admin/post-new.php5.99 ▲0.1098.58 ▲2.47
Media Library /wp-admin/upload.php3.31 ▲0.0836.97 ▲1.90

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
cfv-comment-post-label
cfv-enable-comment-validation
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
cfv-prevenr-die
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Comment form validation and Customization
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲13213.56 ▼0.889.04 ▲7.0943.58 ▼1.49
Dashboard /wp-admin2,238 ▲324.86 ▼0.05114.26 ▲4.0045.91 ▲6.13
Posts /wp-admin/edit.php2,123 ▲232.00 ▼0.0433.78 ▼4.7534.65 ▼1.63
Add New Post /wp-admin/post-new.php1,557 ▲1223.09 ▼0.08666.54 ▲6.9960.55 ▲9.50
Media Library /wp-admin/upload.php1,420 ▲204.21 ▼0.0396.39 ▼19.0343.37 ▼6.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/comment-form-validation-and-customization/public/partials/cv-comment-form-validation-public-display.php
    • > /wp-content/plugins/comment-form-validation-and-customization/admin/partials/cv-comment-form-validation-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: customization, comments, comment form, validation

comment-form-validation-and-customization/cv-comment-form-validation.php 92% from 13 tests

This is the main PHP file of "Comment form validation and Customization" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("comment-form-validation-and-customization.php" instead of "cv-comment-form-validation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected361 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12134581312
JavaScript222738
CSS23811

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.14
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected