89% decent-comments

Code Review | Decent Comments

WordPress plugin Decent Comments scored89%from 54 tests.

About plugin

  • Plugin page: decent-comments
  • Plugin version: 1.12.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: Sep 7, 2011
  • Latest release: Oct 29, 2022
  • Number of updates: 83
  • Update frequency: every 49.1 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

3,000+ active /101,742 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼6.83ms] Passed 4 tests

Server-side resources used by Decent Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1841.19 ▼4.52
Dashboard /wp-admin3.49 ▲0.1852.42 ▼2.01
Posts /wp-admin/edit.php3.60 ▲0.2448.30 ▼0.17
Add New Post /wp-admin/post-new.php6.07 ▲0.1888.40 ▼20.63
Media Library /wp-admin/upload.php3.41 ▲0.1841.86 ▲7.69
Decent Comments /wp-admin/plugins.php?page=decent-comments-options3.3833.89

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_decent_comments_widget
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Decent Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.72 ▲0.081.67 ▼0.1540.35 ▼2.49
Dashboard /wp-admin2,202 ▲285.65 ▲0.1286.23 ▼8.6642.02 ▲0.08
Posts /wp-admin/edit.php2,104 ▲71.97 ▼0.1337.05 ▼0.8034.21 ▲0.51
Add New Post /wp-admin/post-new.php1,533 ▼421.10 ▲2.86677.22 ▲14.2161.85 ▲2.53
Media Library /wp-admin/upload.php1,407 ▲74.26 ▲0.0899.54 ▼6.5645.59 ▲6.01
Decent Comments /wp-admin/plugins.php?page=decent-comments-options7771.9925.4825.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_decent_comments_widget
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Screenshot #1 (Decent Comments widget configuration.) image missing
You can take inspiration from this readme.txt

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

Analyzing the main PHP file in "Decent Comments" version 1.12.0
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 257 characters long)

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
Good job! No executable or dangerous file extensions detected2,924 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PO File106797591,857
PHP61805221,045
CSS101922

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity51.40
▷ Minimum class complexity1.00
▷ Maximum class complexity130.00
Average method complexity13.00
▷ Minimum method complexity1.00
▷ Maximum method complexity84.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods21
▷ Static methods1571.43%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png40.91KB13.99KB▼ 65.80%