84% comments-advanced

Code Review | Comments-advanced

WordPress plugin Comments-advanced scored84%from 54 tests.

About plugin

  • Plugin page: comments-advanced
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: Aug 16, 2012
  • Latest release: Aug 3, 2020
  • Number of updates: 18
  • Update frequency: every 161.6 days
  • Top authors: webvitaly (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

40+ active /2,575 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.03MB] [CPU: ▼4.18ms] Passed 4 tests

An overview of server-side resources used by Comments-advanced
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.16 ▼8.44
Dashboard /wp-admin3.33 ▲0.0346.95 ▼3.43
Posts /wp-admin/edit.php3.38 ▲0.0346.30 ▲0.47
Add New Post /wp-admin/post-new.php5.91 ▲0.0395.08 ▼5.32
Media Library /wp-admin/upload.php3.26 ▲0.0336.72 ▲6.04

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Comments-advanced
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.21 ▼1.091.65 ▼0.3240.58 ▼4.98
Dashboard /wp-admin2,206 ▲184.86 ▼0.98107.73 ▼6.0639.03 ▼3.67
Posts /wp-admin/edit.php2,092 ▼02.00 ▲0.0139.53 ▲2.8437.02 ▲3.36
Add New Post /wp-admin/post-new.php1,519 ▼1523.36 ▲0.14669.55 ▲5.6652.42 ▼5.10
Media Library /wp-admin/upload.php1,382 ▼64.18 ▼0.0395.44 ▼1.6241.97 ▼2.89

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_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comments-advanced/comments-advanced.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Comment's meta-box) image missing
You can look at the official readme.txt

comments-advanced/comments-advanced.php Passed 13 tests

The main PHP script in "Comments-advanced" version 2.0 is automatically included on every request by WordPress
99 characters long description:
Edit comment's info: Post ID, Parent Comment ID, User ID, Author IP, Author Agent and Comment Date.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin185 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1229185

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png29.12KB12.15KB▼ 58.29%