83% hide-comments-are-closed

Code Review | Hide "Comments are closed"

WordPress plugin Hide "Comments are closed" scored83%from 54 tests.

About plugin

  • Plugin page: hide-comments-are...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2015
  • Latest release: Oct 17, 2016
  • Number of updates: 8
  • Update frequency: every 48.4 days
  • Top authors: amitworkdesk (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,734 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Hide "Comments are closed"
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.04 ▼13.22
Dashboard /wp-admin3.31 ▲0.0150.21 ▼1.18
Posts /wp-admin/edit.php3.36 ▲0.0052.71 ▼0.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.63 ▲2.64
Media Library /wp-admin/upload.php3.23 ▲0.0040.16 ▲8.22

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hide "Comments are closed"
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.73 ▲0.332.01 ▲0.3242.92 ▲0.33
Dashboard /wp-admin2,203 ▲185.84 ▼0.1797.49 ▼16.6639.04 ▼0.05
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0538.25 ▼0.0435.20 ▲2.86
Add New Post /wp-admin/post-new.php1,514 ▼017.42 ▼0.12678.36 ▼13.0354.96 ▼4.84
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.00104.74 ▼2.3740.09 ▼6.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hide-comments-are-closed/hide_comments_are_closed.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: l10n, remove text, i18n, comments

hide-comments-are-closed/hide_comments_are_closed.php 77% from 13 tests

The main file in "Hide "Comments are closed"" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 202 characters long)
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("http://wpuncle.com/donate/")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hide-comments-are-closed.php" instead of "hide_comments_are_closed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin9 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1299

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
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

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