10% wp-comment-validation

Code Review | wp comment validation

WordPress plugin wp comment validation scored10%from 54 tests.

About plugin

  • Plugin page: wp-comment-valida...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Aug 27, 2013
  • Latest release: May 12, 2015
  • Number of updates: 26
  • Update frequency: every 24.8 days
  • Top authors: ajay3085006 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,391 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/wp-comment-validation/wp-comment-validation.php+13
    Use of undefined constant wcv_enable - assumed 'wcv_enable' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.72ms] Passed 4 tests

Analyzing server-side resources used by wp comment validation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.08 ▼1.66
Dashboard /wp-admin3.35 ▲0.0446.28 ▼4.58
Posts /wp-admin/edit.php3.40 ▲0.0451.43 ▼4.81
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.44 ▼7.84
Media Library /wp-admin/upload.php3.27 ▲0.0437.32 ▲0.73

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 11 new options
New WordPress options
theysaidso_admin_options
wcv_enable
db_upgraded
widget_theysaidso_widget
wcv_website_enable
wcv_comment_enable
can_compress_scripts
widget_recent-comments
widget_recent-posts
wcv_name_enable
...

Browser metrics Passed 4 tests

Checking browser requirements for wp comment validation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲13113.46 ▼0.928.94 ▲7.1140.42 ▼11.60
Dashboard /wp-admin2,210 ▲335.67 ▼0.0286.83 ▼5.1691.15 ▲43.99
Posts /wp-admin/edit.php2,112 ▲92.02 ▲0.0338.52 ▼2.2237.17 ▼1.03
Add New Post /wp-admin/post-new.php1,692 ▲16622.65 ▲5.14734.07 ▲31.2040.05 ▼16.30
Media Library /wp-admin/upload.php1,409 ▲94.21 ▲0.03102.08 ▼31.5579.53 ▲15.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-comment-validation/wp-comment-validation.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: comments validation, wordpress comment validation plugin

wp-comment-validation/wp-comment-validation.php Passed 13 tests

"wp comment validation" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
47 characters long description:
comment form validation Component for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin262 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12519143
JavaScript10489
CSS15430

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.08MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-2.png50.63KB0.00KB▼ 100.00%
images/icon.png3.46KB0.64KB▼ 81.51%
screenshot-1.png30.81KB10.06KB▼ 67.33%