78% no-page-comment

Code Review | No Page Comment

WordPress plugin No Page Comment scored78%from 54 tests.

About plugin

  • Plugin page: no-page-comment
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0.1
  • WordPress version: 6.3.1
  • First release: Sep 6, 2011
  • Latest release: Sep 20, 2022
  • Number of updates: 45
  • Update frequency: every 89.6 days
  • Top authors: sethta (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

20,000+ active /232,811 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by No Page Comment
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.65 ▼4.79
Dashboard /wp-admin3.33 ▲0.0351.83 ▼0.06
Posts /wp-admin/edit.php3.44 ▲0.0949.26 ▼1.21
Add New Post /wp-admin/post-new.php5.91 ▲0.02104.71 ▲1.94
Media Library /wp-admin/upload.php3.25 ▲0.0235.63 ▲2.64

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
sta_npc_options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for No Page Comment
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8313.63 ▼0.741.73 ▼0.2638.99 ▼3.97
Dashboard /wp-admin2,225 ▲185.79 ▲0.7099.45 ▼10.1540.33 ▲1.32
Posts /wp-admin/edit.php2,104 ▲12.17 ▲0.1839.85 ▼2.8735.31 ▲0.25
Add New Post /wp-admin/post-new.php1,557 ▲1018.46 ▼4.91615.87 ▲0.2849.43 ▼5.50
Media Library /wp-admin/upload.php1,401 ▲14.20 ▼0.05102.17 ▼0.5846.06 ▲1.70
No Page Comment /wp-admin/no-page-comment.php260.440.1218.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • sta_npc_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/no-page-comment/uninstall.php
    • > /wp-content/plugins/no-page-comment/no-page-comment-settings.php
    • > /wp-content/plugins/no-page-comment/no-page-comment.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/no-page-comment.php
    • > Network (severe)
    wp-admin/no-page-comment.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

no-page-comment/no-page-comment.php Passed 13 tests

The primary PHP file in "No Page Comment" version 1.2 is used by WordPress to initiate all plugin functionality
115 characters long description:
An admin interface to control the default comment and trackback settings on new posts, pages and custom post types.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected640 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP310865456
PO File1283077
CSS14069
JavaScript10138

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin