94% advanced-comment-validation

Code Review | Advanced Comment Validation

WordPress plugin Advanced Comment Validation scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-comment-...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 1.3.0-4.6.1
  • WordPress version: 5.9.2
  • First release: Apr 9, 2013
  • Latest release: Nov 28, 2016
  • Number of updates: 19
  • Update frequency: every 70.0 days
  • Top authors: abhi-ime (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,990 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼296.94ms] Passed 4 tests

Analyzing server-side resources used by Advanced Comment Validation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0154.09 ▲4.32
Dashboard /wp-admin3.42 ▲0.0131.98 ▼1.94
Posts /wp-admin/edit.php3.65 ▲0.0136.10 ▼0.49
Add New Post /wp-admin/post-new.php6.89 ▼0.0892.42 ▼1,183.58
Media Library /wp-admin/upload.php3.30 ▲0.0024.62 ▼1.76

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Comment Validation
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,945 ▲20116.37 ▲0.7210.38 ▲3.962.48 ▲0.19
Dashboard /wp-admin2,907 ▲466.15 ▼0.05120.86 ▼19.37157.62 ▼9.15
Posts /wp-admin/edit.php2,703 ▲93.27 ▲0.0364.01 ▼1.51144.20 ▼0.77
Add New Post /wp-admin/post-new.php1,675 ▲1416.62 ▼0.24404.26 ▼12.36155.84 ▲1.21
Media Library /wp-admin/upload.php1,713 ▲155.60 ▲0.07147.55 ▲1.76187.43 ▲3.96

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 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/advanced-comment-validation/comment-validation.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: comments form validation, comment form, comments, advanced comment validation

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

The main PHP script in "Advanced Comment Validation" version 2.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-comment-validation.php" instead of "comment-validation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,045 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2201,029
CSS1008
PHP1388

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected