88% hide-comments-feature

Code Review | Hide Comments Feature

WordPress plugin Hide Comments Feature scored 88% from 54 tests.

About plugin

  • Plugin page: hide-comments-fea...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 5.8.1
  • First release: Nov 29, 2010
  • Latest release: Oct 24, 2012
  • Number of updates: 15
  • Update frequency: every 46.3 days
  • Top authors: lightningspirit (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active / 47,513 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Hide Comments Feature
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1439.57 ▲17.88
Dashboard /wp-admin3.08 ▲0.0348.70 ▲3.63
Posts /wp-admin/edit.php3.13 ▲0.0244.18 ▲0.28
Add New Post /wp-admin/post-new.php5.44 ▲0.0187.68 ▼578.68
Media Library /wp-admin/upload.php3.02 ▲0.0231.02 ▼0.98
All Comments /wp-admin/edit-comments.php3.0935.66

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options
hide_comments_plugin_version

Browser metrics Passed 4 tests

A check of browser resources used by Hide Comments Feature
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,652 ▲5615.90 ▲0.2911.30 ▲2.2248.82 ▲0.48
Dashboard /wp-admin2,929 ▼25.92 ▼0.01152.63 ▼2.51111.75 ▼4.78
Posts /wp-admin/edit.php2,602 ▼1372.84 ▲0.1267.02 ▼5.4592.96 ▲8.57
Add New Post /wp-admin/post-new.php1,574 ▼10918.36 ▼0.07382.30 ▼45.28106.67 ▲1.10
Media Library /wp-admin/upload.php1,767 ▼555.01 ▼0.00188.10 ▲37.50116.72 ▲1.51
All Comments /wp-admin/edit-comments.php2,3832.8868.4981.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hide-comments-feature/template-comments.php
  • 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/hide-comments-feature/hide-comments.php:75

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (There is no Comments menu link!), #2 (The comments template disappeared (magically) from the Twenty Twelve theme.)
You can take inspiration from this readme.txt

hide-comments-feature/hide-comments.php 85% from 13 tests

"Hide Comments Feature" version 0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hide-comments-feature.php" instead of "hide-comments.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin148 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35675110
PO File26438

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.20
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods1191.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png12.18KB6.02KB▼ 50.57%
screenshot-1.png36.50KB14.78KB▼ 59.51%