84% disable-all-comments

Code Review | Disable All Comments

WordPress plugin Disable All Comments scored84%from 54 tests.

About plugin

  • Plugin page: disable-all-comments
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2017
  • Latest release: Jan 21, 2017
  • Number of updates: 4
  • Update frequency: every 2.8 days
  • Top authors: seosbg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,950 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.11ms] Passed 4 tests

An overview of server-side resources used by Disable All Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0442.01 ▼7.89
Dashboard /wp-admin3.35 ▲0.0448.25 ▼1.45
Posts /wp-admin/edit.php3.40 ▲0.0450.24 ▼3.65
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.38 ▼7.45
Media Library /wp-admin/upload.php3.27 ▲0.0439.66 ▲4.67

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Disable All Comments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.21 ▼1.161.80 ▼0.5243.32 ▲0.81
Dashboard /wp-admin2,220 ▲295.83 ▲0.93104.26 ▲0.0285.71 ▲44.83
Posts /wp-admin/edit.php2,112 ▲232.01 ▲0.0438.14 ▼0.4134.66 ▲2.92
Add New Post /wp-admin/post-new.php1,544 ▲1018.39 ▼4.57634.83 ▼43.0567.37 ▲13.52
Media Library /wp-admin/upload.php1,402 ▲144.17 ▼0.08103.56 ▲1.0145.12 ▲0.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-all-comments/disable-all-comments.php:16

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)
Everything seems fine on the user side

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 to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Admin Panel view of submitted form data.)
The official readme.txt is a good inspiration

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

"Disable All Comments" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
45 characters long description:
Simple WordPress Plugin Disable All Comments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin320 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15145201
CSS113064
PO File1181955

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.58KB1.43KB▼ 9.69%
images/logo.png11.25KB4.39KB▼ 60.99%
screenshot-1.png23.97KB11.12KB▼ 53.61%