90% we-disable-comments

Code Review | Wedepohl Engineering Disable Comments

WordPress plugin Wedepohl Engineering Disable Comments scored90%from 54 tests.

About plugin

  • Plugin page: we-disable-comments
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 6.3.1
  • First release: Feb 15, 2021
  • Latest release: Feb 16, 2022
  • Number of updates: 5
  • Update frequency: every 73.0 days
  • Top authors: mwedepohl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /364 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.44ms] Passed 4 tests

Server-side resources used by Wedepohl Engineering Disable Comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.01 ▼1.75
Dashboard /wp-admin3.33 ▲0.0253.43 ▲0.25
Posts /wp-admin/edit.php3.39 ▲0.0251.50 ▼3.83
Add New Post /wp-admin/post-new.php5.91 ▲0.0297.59 ▼8.42
Media Library /wp-admin/upload.php3.26 ▲0.0240.71 ▲2.70
All Comments /wp-admin/edit-comments.php3.0527.70

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Wedepohl Engineering Disable Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,754 ▼714.38 ▲0.111.86 ▲0.2442.41 ▲0.16
Dashboard /wp-admin2,163 ▼175.56 ▼0.1199.23 ▲3.9241.38 ▼1.77
Posts /wp-admin/edit.php2,011 ▼892.02 ▼0.0136.62 ▼3.8432.28 ▼6.29
Add New Post /wp-admin/post-new.php1,494 ▼3223.40 ▲0.40640.70 ▼69.2755.37 ▼1.14
Media Library /wp-admin/upload.php1,368 ▼324.21 ▲0.0299.48 ▼14.7342.30 ▼3.50
All Comments /wp-admin/edit-comments.php2,1605.4967.1239.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Everything seems fine, however this is by no means an exhaustive test

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)
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
2 plugin tags: comments, disable

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

"Wedepohl Engineering Disable Comments" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
65 characters long description:
Disable Comments from administration menus and post/page editors.

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
No dangerous file extensions were detected57 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2337257

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin