84% enhanced-comment-validation

Code Review | Enhanced Comment Validation

WordPress plugin Enhanced Comment Validation scored84%from 54 tests.

About plugin

  • Plugin page: enhanced-comment-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 6.3.1
  • First release: Nov 11, 2021
  • Latest release: Jan 25, 2022
  • Number of updates: 8
  • Update frequency: every 9.6 days
  • Top authors: mukesh27 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /915 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼8.09ms] Passed 4 tests

An overview of server-side resources used by Enhanced Comment Validation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1445.36 ▲5.59
Dashboard /wp-admin3.44 ▲0.0948.79 ▼8.30
Posts /wp-admin/edit.php3.55 ▲0.2043.22 ▼3.88
Add New Post /wp-admin/post-new.php6.04 ▲0.1585.88 ▼21.92
Media Library /wp-admin/upload.php3.36 ▲0.1335.49 ▲1.75

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

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

Browser metrics Passed 4 tests

Enhanced Comment Validation: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9014.72 ▲0.371.84 ▲0.1841.66 ▲3.36
Dashboard /wp-admin2,215 ▲375.63 ▼0.0795.18 ▼10.7241.81 ▲5.29
Posts /wp-admin/edit.php2,123 ▲232.05 ▲0.0438.20 ▲1.3131.01 ▲0.25
Add New Post /wp-admin/post-new.php1,565 ▲3918.58 ▼4.45611.58 ▲7.8573.86 ▼1.24
Media Library /wp-admin/upload.php1,414 ▲144.30 ▲0.1197.87 ▼4.3241.23 ▼3.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • enhanced_comment_validation_settings

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
Even though no errors were found, 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 take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/enhanced-comment-validation/admin/partials/enhanced-comment-validation-admin-display.php
    • > /wp-content/plugins/enhanced-comment-validation/public/partials/enhanced-comment-validation-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

enhanced-comment-validation/enhanced-comment-validation.php 92% from 13 tests

The main PHP file in "Enhanced Comment Validation" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected973 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12160519589
CSS24318239
JavaScript2331145

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity17.14
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity4.90
▷ Minimum method complexity1.00
▷ Maximum method complexity51.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%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin