84% comments-plus

Code Review | Disable Comments for Any Post Types (Remove comments)

WordPress plugin Disable Comments for Any Post Types (Remove comments) scored84%from 54 tests.

About plugin

  • Plugin page: comments-plus
  • Plugin version: 1.1.8
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.4
  • WordPress version: 6.3.1
  • First release: Oct 17, 2017
  • Latest release: Nov 23, 2023
  • Number of updates: 19
  • Update frequency: every 117.2 days
  • Top authors: webcraftic (57.89%)alexkovalevv (47.37%)

Code review

54 tests

User reviews

33 reviews

Install metrics

8,000+ active /52,302 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.27MB] [CPU: ▲2.71ms] Passed 4 tests

This is a short check of server-side resources used by Disable Comments for Any Post Types (Remove comments)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.21 ▲0.7442.17 ▲4.42
Dashboard /wp-admin4.81 ▲1.4659.45 ▼1.83
Posts /wp-admin/edit.php4.85 ▲1.4959.39 ▲7.30
Add New Post /wp-admin/post-new.php7.34 ▲1.4597.39 ▲0.95
Media Library /wp-admin/upload.php4.66 ▲1.4349.12 ▲14.77
Disable comments /wp-admin/options-general.php?page=comments-wbcr_comments_plus5.56373.83

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 234 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
wbcr_comments_plus_plugin_activated
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
wbcr_comments_plus_plugin_version
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Disable Comments for Any Post Types (Remove comments)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲14714.31 ▲0.201.89 ▲0.3842.09 ▲5.66
Dashboard /wp-admin2,274 ▲975.62 ▼0.0397.18 ▼2.7143.52 ▼2.55
Posts /wp-admin/edit.php2,180 ▲802.03 ▲0.0941.43 ▲2.0136.90 ▲0.68
Add New Post /wp-admin/post-new.php1,577 ▲5023.27 ▲0.07593.34 ▲15.0252.38 ▲2.44
Media Library /wp-admin/upload.php1,453 ▲564.25 ▲0.0597.63 ▼8.8142.41 ▼3.79
Disable comments /wp-admin/options-general.php?page=comments-wbcr_comments_plus1,3742.3840.8846.82

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Factory_Templates_126\\Pages\\Step' not found in wp-content/plugins/comments-plus/libs/factory/templates/pages/setup-parts/class-step-custom.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Factory_Templates_126\\Pages\\Step' not found in wp-content/plugins/comments-plus/libs/factory/templates/pages/setup-parts/class-step-form.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_FactoryForms469_FontControl' not found in wp-content/plugins/comments-plus/libs/factory/forms/controls/google-font.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

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

The main file in "Disable Comments for Any Post Types (Remove comments)" v. 1.1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
119 characters long description:
Allows administrators to globally disable comments on their site. Comments can be disabled for individual record types.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin19,294 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP1143,1347,36610,873
CSS261682572,578
LESS6409911,973
JSON1001,810
PO File103904971,438
JavaScript16189205620
Markdown1102

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity15.88
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces9
Interfaces2
Traits1
Classes95
▷ Abstract classes1616.84%
▷ Concrete classes7983.16%
▷ Final classes00.00%
Methods716
▷ Static methods283.91%
▷ Public methods54175.56%
▷ Protected methods14019.55%
▷ Private methods354.89%
Functions36
▷ Named functions2158.33%
▷ Anonymous functions1541.67%
Constants47
▷ Global constants4085.11%
▷ Class constants714.89%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/factory/templates/pages/templates/impressive/assets/img/webcraftic-plugin-icon.png1.97KB0.75KB▼ 61.79%
libs/factory/templates/pages/templates/impressive-lite/assets/img/5-stars22.png3.51KB0.70KB▼ 79.99%
libs/factory/templates/pages/templates/impressive/assets/img/5-stars22.png3.51KB0.70KB▼ 79.99%
libs/factory/templates/pages/templates/impressive-lite/assets/img/webcraftic-plugin-icon.png1.97KB0.75KB▼ 61.79%
libs/factory/templates/pages/templates/impressive-lite/assets/img/paypal-donate.png12.44KB4.99KB▼ 59.88%