94% advanced-comments

Code Review | Comments

WordPress plugin Comments scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-comments
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 5.9.2
  • First release: Jul 10, 2014
  • Latest release: Dec 9, 2016
  • Number of updates: 4
  • Update frequency: every 266.0 days
  • Top authors: webzunft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 9,037 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼294.90ms] Passed 4 tests

Analyzing server-side resources used by Comments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.4091.43 ▲71.62
Dashboard /wp-admin3.42 ▲0.0236.31 ▼12.09
Posts /wp-admin/edit.php3.65 ▲0.0144.54 ▼1.59
Add New Post /wp-admin/post-new.php6.89 ▼0.0897.50 ▼1,164.59
Media Library /wp-admin/upload.php3.31 ▲0.0124.07 ▼1.34
All Comments /wp-admin/edit-comments.php3.3230.36
Settings /wp-admin/edit-comments.php?page=comments-customizer3.2728.97

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

How much does this plugin use your filesystem and database?
This 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 Comments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,803 ▲4916.05 ▲0.286.20 ▲0.452.76 ▲0.36
Dashboard /wp-admin2,893 ▲356.14 ▼0.04137.21 ▲1.79158.67 ▼4.15
Posts /wp-admin/edit.php2,713 ▲223.23 ▼0.0164.95 ▼3.64141.99 ▼3.36
Add New Post /wp-admin/post-new.php1,676 ▼2222.80 ▲0.83450.54 ▲27.90184.92 ▲13.65
Media Library /wp-admin/upload.php1,723 ▲255.56 ▲0.04139.67 ▼20.11202.50 ▲3.68
All Comments /wp-admin/edit-comments.php2,3963.4062.13142.92
Settings /wp-admin/edit-comments.php?page=comments-customizer1,0032.4059.93121.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Comments_Main' not found in wp-content/plugins/advanced-comments/frontend/comments_frontend.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Comments_Main' not found in wp-content/plugins/advanced-comments/admin/comments_admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: comment, comment form, commenting, comments

advanced-comments/comments.php 92% from 13 tests

The main PHP file in "Comments" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-comments.php" instead of "comments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin117 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP443101117

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity3.67
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin