84% cb-disable-comment-url

Code Review | CB Disable Comment URL

WordPress plugin CB Disable Comment URL scored 84% from 54 tests.

About plugin

  • Plugin page: cb-disable-commen...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2015
  • Latest release: Jul 26, 2022
  • Number of updates: 7
  • Update frequency: every 354.6 days
  • Top authors: hmbashar (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 3,578 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by CB Disable Comment URL
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.76 ▲2.36
Dashboard /wp-admin3.31 ▲0.0145.71 ▼4.50
Posts /wp-admin/edit.php3.36 ▲0.0044.42 ▼3.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.63 ▲3.50
Media Library /wp-admin/upload.php3.23 ▲0.0034.81 ▲3.38

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for CB Disable Comment URL
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.091.77 ▼0.0446.67 ▼4.29
Dashboard /wp-admin2,209 ▲185.85 ▲0.9795.08 ▼20.9238.40 ▼7.87
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0838.25 ▲1.4831.56 ▼5.72
Add New Post /wp-admin/post-new.php1,534 ▲123.35 ▲0.57637.36 ▼17.9660.07 ▲3.18
Media Library /wp-admin/upload.php1,382 ▼64.22 ▲0.0694.16 ▼2.2740.88 ▼2.93

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cb-disable-comment-url/index.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: comment url disable, disable url from comment, remove comment url field, disable url

cb-disable-comment-url/index.php 92% from 13 tests

The primary PHP file in "CB Disable Comment URL" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cb-disable-comment-url.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin7 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1887

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin