84% disable-comments-selectively

Code Review | Disable Comments Selectively

WordPress plugin Disable Comments Selectively scored84%from 54 tests.

About plugin

  • Plugin page: disable-comments-...
  • Plugin version: 0.15
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 10, 2019
  • Latest release: Nov 5, 2023
  • Number of updates: 11
  • Update frequency: every 132.4 days
  • Top authors: keith_wp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /598 total downloads


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.02MB] [CPU: ▼2.21ms] Passed 4 tests

Analyzing server-side resources used by Disable Comments Selectively
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.99 ▲1.08
Dashboard /wp-admin3.32 ▲0.0248.71 ▼5.72
Posts /wp-admin/edit.php3.37 ▲0.0244.08 ▼2.91
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.95 ▲3.13
Media Library /wp-admin/upload.php3.25 ▲0.0233.96 ▼1.27

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 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 Disable Comments Selectively
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5514.67 ▲0.351.99 ▲0.3051.64 ▲6.12
Dashboard /wp-admin2,200 ▲235.64 ▲0.0385.77 ▼15.0538.70 ▼4.83
Posts /wp-admin/edit.php2,102 ▼12.00 ▲0.0234.77 ▼3.1534.47 ▼2.41
Add New Post /wp-admin/post-new.php1,537 ▲1118.79 ▼4.67625.05 ▼59.1781.23 ▲34.80
Media Library /wp-admin/upload.php1,402 ▲84.24 ▲0.03100.97 ▲0.0041.02 ▼1.63

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

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

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 | 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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/disable-comments-selectively/disable-comments-selectively.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/disable-comments-selectively/trunk/disable-comments-selectively.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Version format is invalid
You can take inspiration from this readme.txt

disable-comments-selectively/disable-comments-selectively.php 92% from 13 tests

The principal PHP file in "Disable Comments Selectively" v. 0.15 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 150 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
Everything looks great! No dangerous files found in this plugin299 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity4.92
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods2273.33%
▷ Protected methods00.00%
▷ Private methods826.67%
▷ Named functions00.00%
▷ Anonymous functions16100.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 files were detected