89% comment-form-js-validation

Code Review | Comment Form Js Validation

WordPress plugin Comment Form Js Validation scored89%from 54 tests.

About plugin

  • Plugin page: comment-form-js-v...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Oct 1, 2018
  • Latest release: Nov 18, 2020
  • Number of updates: 37
  • Update frequency: every 21.2 days
  • Top authors: navnitviradiya13 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /11,225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Comment Form Js Validation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.80 ▼1.02
Dashboard /wp-admin3.33 ▼0.0145.53 ▼13.38
Posts /wp-admin/edit.php3.38 ▲0.0245.90 ▼1.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.28 ▼14.98
Media Library /wp-admin/upload.php3.25 ▲0.0234.34 ▲4.45
Comment form js validation /wp-admin/options-general.php?page=comment-form-jv-setting3.2230.86

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

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

Browser metrics Passed 4 tests

Comment Form Js Validation: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.74 ▲0.371.69 ▼0.2038.65 ▼2.92
Dashboard /wp-admin2,209 ▲185.76 ▲0.6698.40 ▼0.0738.86 ▼2.79
Posts /wp-admin/edit.php2,095 ▲62.01 ▼0.0439.44 ▼10.8134.60 ▼1.60
Add New Post /wp-admin/post-new.php1,533 ▲1423.32 ▲0.18619.91 ▲14.6354.13 ▲4.77
Media Library /wp-admin/upload.php1,397 ▲124.22 ▲0.0193.53 ▼7.4740.64 ▼2.88
Comment form js validation /wp-admin/options-general.php?page=comment-form-jv-setting8072.0624.0228.99

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #2 (screenshot-2.png), #3 (screenshot-2.png), #4 (screenshot-2.png)
  • Requires php: Invalid version format
The official readme.txt might help

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

This is the main PHP file of "Comment Form Js Validation" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
78 characters long description:
This plugin use for wordpress comments form js validation to the comment form.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected493 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP38699332
JavaScript31412122
CSS23039

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity15.00
▷ Minimum class complexity3.00
▷ Maximum class complexity21.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 1.68MB with 1.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png42.61KB13.74KB▼ 67.76%
screenshot-2.png57.62KB19.12KB▼ 66.81%
images/step1.png537.07KB176.56KB▼ 67.13%
screenshot-4.png853.72KB258.32KB▼ 69.74%
images/step3.png54.85KB17.81KB▼ 67.52%