84% advanced-comment-validation

Code Review | Advanced Comment Validation

WordPress plugin Advanced Comment Validation scored84%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: 6.3.1
  • 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

100+ active /3,244 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Advanced Comment Validation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.71 ▼0.44
Dashboard /wp-admin3.31 ▼0.0346.52 ▼8.73
Posts /wp-admin/edit.php3.36 ▲0.0142.72 ▼0.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.50 ▼29.20
Media Library /wp-admin/upload.php3.23 ▲0.0134.81 ▲0.33

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, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Comment Validation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲17813.75 ▼0.545.98 ▲4.1841.57 ▼1.61
Dashboard /wp-admin2,218 ▲335.96 ▼0.0698.70 ▼4.2338.50 ▲0.93
Posts /wp-admin/edit.php2,104 ▲122.10 ▲0.0637.87 ▼4.9931.87 ▼5.90
Add New Post /wp-admin/post-new.php1,520 ▼2222.99 ▲4.60662.50 ▲41.7250.75 ▼1.19
Media Library /wp-admin/upload.php1,397 ▲124.31 ▲0.14101.10 ▲5.0443.07 ▼0.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: comments form validation, comments, advanced comment validation, comment form

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

The main file in "Advanced Comment Validation" v. 2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to 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 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,045 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2201,029
CSS1008
PHP1388

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin