84% post-comment-validation

Code Review | Post Comment Validation

WordPress plugin Post Comment Validation scored84%from 54 tests.

About plugin

  • Plugin page: post-comment-vali...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 23, 2017
  • Latest release: Apr 25, 2020
  • Number of updates: 5
  • Update frequency: every 183.0 days
  • Top authors: hk1993 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,403 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.57ms] Passed 4 tests

This is a short check of server-side resources used by Post Comment Validation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.77 ▲0.52
Dashboard /wp-admin3.31 ▼0.0351.33 ▼12.41
Posts /wp-admin/edit.php3.36 ▲0.0147.24 ▼5.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.53 ▼24.06
Media Library /wp-admin/upload.php3.24 ▲0.0137.94 ▼0.68

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Comment Validation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.90 ▼0.718.37 ▲6.5247.55 ▲5.09
Dashboard /wp-admin2,204 ▲135.83 ▲0.95106.06 ▼5.1139.71 ▼1.32
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0536.17 ▼4.7135.39 ▼1.23
Add New Post /wp-admin/post-new.php1,522 ▼623.10 ▼0.21650.27 ▲49.6956.36 ▼10.01
Media Library /wp-admin/upload.php1,395 ▲44.20 ▼0.0198.75 ▼0.6144.66 ▼1.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/post-comment-validation/admin/partials/post-comment-validation-admin-display.php
    • > /wp-content/plugins/post-comment-validation/public/partials/post-comment-validation-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

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

The primary PHP file in "Post Comment Validation" version 1.0.0 is used by WordPress to initiate all plugin functionality
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected219 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP12112530173
JavaScript465437
CSS3099

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin