89% wu-block-comments

Code Review | WU - Block comments

WordPress plugin WU - Block comments scored89%from 54 tests.

About plugin

  • Plugin page: wu-block-comments
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.4
  • WordPress version: 6.3.1
  • First release: Jan 16, 2012
  • Latest release: Nov 25, 2015
  • Number of updates: 13
  • Update frequency: every 108.4 days
  • Top authors: Sir-Uli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /4,259 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by WU - Block comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.07 ▼1.78
Dashboard /wp-admin3.34 ▼0.0145.49 ▼10.24
Posts /wp-admin/edit.php3.39 ▲0.0344.24 ▼2.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.25 ▲7.29
Media Library /wp-admin/upload.php3.26 ▲0.0334.30 ▼0.67

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

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

Browser metrics Passed 4 tests

WU - Block comments: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.30 ▼1.111.77 ▲0.1143.52 ▲4.32
Dashboard /wp-admin2,214 ▲345.83 ▼0.1299.89 ▼7.4841.55 ▲1.66
Posts /wp-admin/edit.php2,092 ▼02.04 ▲0.0438.54 ▲3.5637.14 ▲6.82
Add New Post /wp-admin/post-new.php1,533 ▲423.25 ▲5.06605.14 ▼8.4656.54 ▲4.65
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.0392.83 ▼0.9542.17 ▲0.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wu-block-comments === )
  • Screenshots: Add images for these screenshots: #1 (This is the message shown when a comment is blocked.), #2 (This is the settings section in the discussion settings.), #3 (This shows the counter in the section "Right Now" in the dashboard.)
Please take inspiration from this readme.txt

wu-block-comments/wu-block-comments.php Passed 13 tests

The entry point to "WU - Block comments" version 1.2 is a PHP file that has certain tags in its header comment area
47 characters long description:
Blocks comments if problematic words are posted

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected175 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11046116
PO File18959

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png17.50KB8.85KB▼ 49.41%
screenshot-2.png24.04KB11.82KB▼ 50.81%
screenshot-1.png2.98KB1.49KB▼ 50.18%