72% page-comments-off-please

Code Review | Page Comments Off Please

WordPress plugin Page Comments Off Please scored 72% from 54 tests.

About plugin

  • Plugin page: page-comments-off...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.4
  • WordPress version: 6.3.1
  • First release: Sep 16, 2010
  • Latest release: Jan 30, 2016
  • Number of updates: 27
  • Update frequency: every 72.6 days
  • Top authors: techism (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active / 54,124 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.02MB] [CPU: ▼3.71ms] Passed 4 tests

This is a short check of server-side resources used by Page Comments Off Please
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0338.71 ▼2.84
Dashboard /wp-admin3.32 ▲0.0248.50 ▼8.86
Posts /wp-admin/edit.php3.44 ▲0.0850.60 ▲4.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.28 ▼5.10
Media Library /wp-admin/upload.php3.25 ▲0.0235.74 ▲1.98
Page Comments Off Please /wp-admin/options-general.php?page=page-comments-off-please3.2531.74

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

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

Browser metrics Passed 4 tests

Page Comments Off Please: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.30 ▼1.484.16 ▲2.4741.12 ▼8.42
Dashboard /wp-admin2,210 ▲195.85 ▼0.06106.95 ▲5.2141.48 ▼3.27
Posts /wp-admin/edit.php2,096 ▲72.03 ▼0.0039.74 ▲2.4934.89 ▼0.60
Add New Post /wp-admin/post-new.php1,538 ▲2423.61 ▲6.18686.62 ▼9.1758.12 ▲2.38
Media Library /wp-admin/upload.php1,389 ▲14.30 ▲0.1097.39 ▼12.4540.75 ▼5.03
Page Comments Off Please /wp-admin/options-general.php?page=page-comments-off-please7091.557.1320.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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • disable_page_comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=page-comments-off-please
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/page-comments-off-please/includes/pcop_options.php on line 16 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/page-comments-off-please/includes/pcop_options.php(16): do_settings_fields()
    #1 wp-content/plugins/page-comments-off-please/pagecommentsoffplease.php(228): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): Page_Comments_Off_Please->plugin_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

SRP 0% 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 fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/page-comments-off-please/pagecommentsoffplease.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/page-comments-off-please/includes/pcop_options.php:6

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 93% from 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
9 plugin tags: uncheck, page comments, checkbox, page, please...

page-comments-off-please/pagecommentsoffplease.php 85% from 13 tests

Analyzing the main PHP file in "Page Comments Off Please" version 2.0.4
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 194 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("page-comments-off-please.php" instead of "pagecommentsoffplease.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin263 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP237173249
JavaScript10310
CSS1104

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods318.75%
▷ Public methods16100.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
There were not PNG files found in your plugin