78% comment-validation-reloaded

Code Review | Comment Validation Reloaded

WordPress plugin Comment Validation Reloaded scored 78% from 54 tests.

About plugin

  • Plugin page: comment-validatio...
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.2
  • WordPress version: 6.3.1
  • First release: Apr 20, 2010
  • Latest release: Dec 18, 2014
  • Number of updates: 67
  • Update frequency: every 27.0 days
  • Top authors: austyfrosty (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 11,653 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.25MB] [CPU: ▼13.52ms] Passed 4 tests

Analyzing server-side resources used by Comment Validation Reloaded
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▼0.5819.57 ▼22.97
Dashboard /wp-admin3.28 ▼0.0331.56 ▼17.92
Posts /wp-admin/edit.php3.34 ▼0.0135.54 ▼9.07
Add New Post /wp-admin/post-new.php5.52 ▼0.3791.41 ▲6.97
Media Library /wp-admin/upload.php3.28 ▲0.0531.67 ▼4.12

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Comment Validation Reloaded: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲14413.64 ▼0.921.73 ▼0.2337.94 ▼4.07
Dashboard /wp-admin2,285 ▲1005.87 ▲0.01108.00 ▲1.9050.15 ▲8.75
Posts /wp-admin/edit.php2,111 ▲192.01 ▼0.0239.68 ▲0.6937.79 ▼0.59
Add New Post /wp-admin/post-new.php1,559 ▲2323.41 ▼0.05590.37 ▼7.7450.64 ▲6.15
Media Library /wp-admin/upload.php1,411 ▲204.25 ▲0.0498.41 ▲0.5942.72 ▼1.11
Comment Validation /wp-admin/comment-validation-reloaded.php260.440.0614.97

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 take a closer look at the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined index: id in wp-content/plugins/comment-validation-reloaded/library/js/validation.js.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/comment-validation-reloaded/library/js/validation.js.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/comment-validation-reloaded/comment-validation-reloaded.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/comment-validation-reloaded/library/admin/settings.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comment-validation-reloaded/library/admin/dashboard.php:17
    • > PHP Notice
      Undefined index: min in wp-content/plugins/comment-validation-reloaded/library/js/validation.js.php on line 21

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/comment-validation-reloaded.php
    • > Network (severe)
    wp-admin/comment-validation-reloaded.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: validation, jquery validation, comment validation, reloaded, comment

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

This is the main PHP file of "Comment Validation Reloaded" version 0.5, 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:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 230 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,858 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31711401,158
PHP5162224605
CSS25095

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
PNG images were not found in this plugin