77% disable-comments-wpz

Code Review | Disable Comments | WPZest

WordPress plugin Disable Comments | WPZest scored77%from 54 tests.

About plugin

  • Plugin page: disable-comments-wpz
  • Plugin version: 1.51
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7.3
  • WordPress version: 6.3.1
  • First release: Sep 19, 2015
  • Latest release: Mar 29, 2017
  • Number of updates: 135
  • Update frequency: every 4.1 days
  • Top authors: wpzest (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /14,325 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼3.59ms] Passed 4 tests

This is a short check of server-side resources used by Disable Comments | WPZest
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.20 ▼2.60
Dashboard /wp-admin3.43 ▲0.1249.01 ▼2.25
Posts /wp-admin/edit.php3.46 ▲0.1150.88 ▲0.55
Add New Post /wp-admin/post-new.php6.10 ▲0.2285.72 ▼10.07
Media Library /wp-admin/upload.php3.36 ▲0.1433.36 ▲0.64
Disable Comments /wp-admin/options-general.php?page=books-shortcode-ref3.3236.51

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable Comments | WPZest
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.37 ▲0.101.81 ▼0.7446.48 ▼1.07
Dashboard /wp-admin2,196 ▲285.62 ▲0.0594.85 ▲3.7041.23 ▼3.78
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0340.97 ▲3.7136.46 ▲1.37
Add New Post /wp-admin/post-new.php1,530 ▲223.41 ▲0.19662.69 ▲60.1063.66 ▲15.56
Media Library /wp-admin/upload.php1,407 ▲44.18 ▼0.0397.37 ▲0.4446.24 ▲0.80
Disable Comments /wp-admin/options-general.php?page=books-shortcode-ref1,0922.2133.8958.91

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=books-shortcode-ref
    • > Notice in wp-content/plugins/disable-comments-wpz/dc-wpzest.php+349
    Undefined variable: everywhere
    • > GET request to /wp-admin/options-general.php?page=books-shortcode-ref
    • > Notice in wp-content/plugins/disable-comments-wpz/dc-wpzest.php+427
    Undefined variable: checkedmedia

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/disable-comments-wpz/dc-wpzest.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Screenshot #5 (Disable Comments in settings of wordpress Dashboard) image not found
  • Tags: You are using too many tags: 17 tag instead of maximum 10
Please take inspiration from this readme.txt

disable-comments-wpz/dc-wpzest.php 77% from 13 tests

The main PHP file in "Disable Comments | WPZest" ver. 1.51 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("disable-comments-wpz.php" instead of "dc-wpzest.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 203 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin970 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP16045484
PO File57589287
CSS1285153
JavaScript2111246

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods150.00%
▷ Public methods150.00%
▷ Protected methods00.00%
▷ Private methods150.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.23MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png51.20KB22.23KB▼ 56.58%
assets/screenshot-4.png65.78KB28.47KB▼ 56.71%
assets/screenshot-3.png55.50KB22.11KB▼ 60.15%
assets/screenshot-1.png48.43KB19.55KB▼ 59.62%
assets/icon-128x128.png16.39KB10.88KB▼ 33.63%