84% wp-disable-all-comments

Code Review | Wordpress Disable All Comments

WordPress plugin Wordpress Disable All Comments scored84%from 54 tests.

About plugin

  • Plugin page: wp-disable-all-co...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.2.0+
  • WordPress version: 6.3.1
  • First release: Jan 7, 2019
  • Latest release: Jan 7, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: alborn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /430 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.15ms] Passed 4 tests

A check of server-side resources used by Wordpress Disable All Comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.85 ▼15.68
Dashboard /wp-admin3.32 ▼0.0346.00 ▼11.95
Posts /wp-admin/edit.php3.35 ▼0.0145.36 ▼1.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.38 ▲2.19
Media Library /wp-admin/upload.php3.24 ▲0.0133.90 ▲0.37
All Comments /wp-admin/edit-comments.php3.0924.04

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Wordpress Disable All Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,783 ▲3713.54 ▼1.201.61 ▼0.7140.44 ▼7.03
Dashboard /wp-admin2,192 ▲44.80 ▼1.09101.26 ▼17.3739.24 ▼1.96
Posts /wp-admin/edit.php1,943 ▼1462.00 ▼0.0139.97 ▲1.8235.09 ▲2.53
Add New Post /wp-admin/post-new.php1,520 ▼2223.20 ▲4.54646.24 ▲28.1655.51 ▼2.49
Media Library /wp-admin/upload.php1,365 ▼234.27 ▲0.0799.26 ▼4.8041.29 ▼2.66
All Comments /wp-admin/edit-comments.php2,1925.7780.2037.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-disable-all-comments/wp-disable-all-comments.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: wp comments, hide comments, disable wp comments, lightweight, wp disable comments...

wp-disable-all-comments/wp-disable-all-comments.php Passed 13 tests

"Wordpress Disable All Comments" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
46 characters long description:
Disable comments on all posts, past and future

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
Good job! No executable or dangerous file extensions detected26 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191426

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin