84% disable-comments-by-click5

Code Review | Disable Comments by click5

WordPress plugin Disable Comments by click5 scored84%from 54 tests.

About plugin

  • Plugin page: disable-comments-...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Oct 7, 2021
  • Latest release: Sep 28, 2023
  • Number of updates: 31
  • Update frequency: every 23.3 days
  • Top authors: click5 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,238 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.19ms] Passed 4 tests

An overview of server-side resources used by Disable Comments by click5
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.62 ▲5.43
Dashboard /wp-admin3.36 ▲0.0151.11 ▼8.09
Posts /wp-admin/edit.php3.41 ▲0.0647.23 ▲3.22
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.53 ▲3.32
Media Library /wp-admin/upload.php3.28 ▲0.0536.78 ▲2.33
Disable Comments /wp-admin/options-general.php?page=disable-comments-by-click53.2636.76
All Comments /wp-admin/edit-comments.php2.067.10

Server storage [IO: ▲0.74MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 12 new options
New WordPress options
click5_disable_comments_display_globally
click5_disable_comments_display_rpc
can_compress_scripts
click5_disable_comments_force_autoupdate
click5_disable_comments_display_api
theysaidso_admin_options
widget_theysaidso_widget
click5_disable_comments_activation_date
widget_recent-posts
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable Comments by click5
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,741 ▼4514.28 ▼0.271.66 ▼0.1744.09 ▲7.82
Dashboard /wp-admin2,163 ▼85.58 ▲0.0694.48 ▲7.6740.88 ▲1.88
Posts /wp-admin/edit.php2,072 ▼282.04 ▲0.0335.36 ▲0.0033.31 ▼5.68
Add New Post /wp-admin/post-new.php1,507 ▼2423.01 ▼0.00649.42 ▼7.0751.76 ▼7.80
Media Library /wp-admin/upload.php1,366 ▼284.17 ▼0.0196.83 ▼4.3143.74 ▲1.59
Disable Comments /wp-admin/options-general.php?page=disable-comments-by-click59822.0024.8140.44
All Comments /wp-admin/edit-comments.php2,1635.4768.1135.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
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 plugin_dir_path() in wp-content/plugins/disable-comments-by-click5/disable-comments-by-click5.php:15

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 Passed 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
5 plugin tags: disable, spam, disable comments, comments, click5

disable-comments-by-click5/disable-comments-by-click5.php Passed 13 tests

"Disable Comments by click5" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
68 characters long description:
Disable comments on your website and protect yourself from spammers.

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
Good job! No executable or dangerous file extensions detected876 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP212471547
CSS1671329

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions32
▷ Named functions3093.75%
▷ Anonymous functions26.25%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.60MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/sitemap.png70.41KB29.81KB▼ 57.66%
assets/baner-v01c.png83.68KB33.21KB▼ 60.31%
assets/screenshot-1.png194.79KB70.97KB▼ 63.56%
assets/banner-772x250.png54.31KB23.81KB▼ 56.16%
assets/banner-300x515-sitemap-plugin.png142.17KB59.35KB▼ 58.25%