90% disable-comments-rb

Code Review | Disable Comments

WordPress plugin Disable Comments scored90%from 54 tests.

About plugin

  • Plugin page: disable-comments-rb
  • Plugin version: 1.0.22
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2017
  • Latest release: May 18, 2023
  • Number of updates: 39
  • Update frequency: every 55.9 days
  • Top authors: rbplugins (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

90,000+ active /595,972 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.10ms] Passed 4 tests

Analyzing server-side resources used by Disable Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.35 ▲0.61
Dashboard /wp-admin3.32 ▲0.0146.92 ▼2.02
Posts /wp-admin/edit.php3.37 ▲0.0145.84 ▼1.78
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.70 ▼17.20
Media Library /wp-admin/upload.php3.24 ▲0.0134.99 ▲1.70
Disable Comments RB /wp-admin/options-general.php?page=rb_disable_comments_settings3.2630.98

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Disable Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.17 ▼0.441.67 ▼0.1044.40 ▲3.76
Dashboard /wp-admin2,208 ▲345.62 ▲0.0294.25 ▲7.5343.08 ▼1.92
Posts /wp-admin/edit.php2,113 ▲132.11 ▲0.0833.68 ▼4.0234.34 ▲0.77
Add New Post /wp-admin/post-new.php1,538 ▲1023.40 ▲0.41614.21 ▼17.1260.33 ▲6.83
Media Library /wp-admin/upload.php1,413 ▲104.20 ▲0.0297.25 ▼1.5146.42 ▲1.72
Disable Comments RB /wp-admin/options-general.php?page=rb_disable_comments_settings8252.0124.4029.45

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Disable Comments plugin - options screen of the Disable Comments RB), #2 (Disable Comments notice)
Please take inspiration from this readme.txt

disable-comments-rb/disable-comments-rb.php Passed 13 tests

The principal PHP file in "Disable Comments" v. 1.0.22 is loaded by WordPress automatically on each request
136 characters long description:
Easy tool to disable comments for your blog posts, pages. Admin can disable comments in just few clicks. Delete comments from blog post.

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
Success! There were no dangerous files found in this plugin705 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP412149467
PO File23340131
SVG111107

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods13.70%
▷ Public methods2385.19%
▷ Protected methods00.00%
▷ Private methods414.81%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo_drc.png9.48KB3.72KB▼ 60.73%
screenshot-1.png8.98KB5.05KB▼ 43.82%
assets/images/logo_dp.png10.42KB3.13KB▼ 69.94%
screenshot-2.png4.25KB2.66KB▼ 37.37%