84% comments-disclaimer

Code Review | Comments Disclaimer

WordPress plugin Comments Disclaimer scored84%from 54 tests.

About plugin

  • Plugin page: comments-disclaimer
  • Plugin version: 1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Jun 9, 2023
  • Latest release: Oct 5, 2023
  • Number of updates: 4
  • Update frequency: every 29.5 days
  • Top authors: alanjacobmathew (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /90 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.81ms] Passed 4 tests

This is a short check of server-side resources used by Comments Disclaimer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.64 ▼9.49
Dashboard /wp-admin3.36 ▲0.0544.80 ▼6.03
Posts /wp-admin/edit.php3.41 ▲0.0548.93 ▲0.96
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.37 ▼0.68
Media Library /wp-admin/upload.php3.28 ▲0.0534.92 ▲2.64
Comments Disclaimer /wp-admin/edit-comments.php?page=comments-disclaimer-plugin3.3031.07
All Comments /wp-admin/edit-comments.php3.3438.93

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Comments Disclaimer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲14313.94 ▼0.474.71 ▲2.6839.14 ▼13.45
Dashboard /wp-admin2,223 ▲354.83 ▼0.98112.57 ▼4.3142.88 ▼2.39
Posts /wp-admin/edit.php2,106 ▲172.05 ▲0.0439.42 ▲1.4635.22 ▲2.84
Add New Post /wp-admin/post-new.php6,258 ▲4,72525.67 ▲2.59814.99 ▲96.1860.12 ▲0.35
Media Library /wp-admin/upload.php1,405 ▲204.19 ▼0.0295.96 ▼9.1641.93 ▼1.98
Comments Disclaimer /wp-admin/edit-comments.php?page=comments-disclaimer-plugin7762.0524.0140.00
All Comments /wp-admin/edit-comments.php1,8092.2941.4336.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comments-disclaimer/comments-disclaimer.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: disclaimer, comments, comments disclaimer

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

The main file in "Comments Disclaimer" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
139 characters long description:
A minimalist plugin that will add a public comments disclaimer to your site. Protect yourself from liabilities for user-generated comments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected390 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File44848238

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods14100.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
No PNG images were found in this plugin