83% featured-comment-widget

Code Review | Featured Comment Widget

WordPress plugin Featured Comment Widget scored 83% from 53 tests.

About plugin

  • Plugin page: featured-comment-...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-4.3.1
  • WordPress version: 5.8.1
  • First release: Apr 4, 2011
  • Latest release: Sep 17, 2015
  • Number of updates: 29
  • Update frequency: every 56.1 days
  • Top authors: jennschiffer (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

80+ active / 5,825 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼285.45ms] Passed 4 tests

A check of server-side resources used by Featured Comment Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1528.21 ▲8.39
Dashboard /wp-admin3.09 ▲0.0440.24 ▼4.98
Posts /wp-admin/edit.php3.14 ▲0.0434.21 ▼8.03
Add New Post /wp-admin/post-new.php5.46 ▲0.0392.22 ▼1,122.25
Media Library /wp-admin/upload.php3.03 ▲0.0331.65 ▼6.55

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options
widget_featuredcomment

Browser metrics Passed 4 tests

Checking browser requirements for Featured Comment Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,652 ▲7015.84 ▲0.247.73 ▼0.3947.92 ▲3.66
Dashboard /wp-admin2,931 ▲815.89 ▲0.09134.24 ▼12.77104.25 ▼8.27
Posts /wp-admin/edit.php2,706 ▼02.69 ▲0.0168.55 ▲1.6892.02 ▲9.53
Add New Post /wp-admin/post-new.php1,479 ▼17716.89 ▲0.10348.79 ▼92.48112.42 ▼24.35
Media Library /wp-admin/upload.php1,772 ▼05.03 ▲0.02164.49 ▲19.90119.61 ▼7.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_featuredcomment

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/featured-comment-widget/featured-comment-widget.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% 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:
  • Screenshots: These screenshots require images: #1 (Finding the comment ID to enter into your widget form.), #2 (Finding the comment ID in the Dashboard.), #3 (The Featured Comment Widget form.), #4 (This is what the widget looks like if you're using the Twenty Ten theme by WordPress.), #5 (This is what the widget looks like on a custom themed blog, with the comments excerpted at approximately 95 characters.), #6 (This is what the widget looks like on Twenty Thirteen, with multiple (3) comments showing up at once.)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === featured-comment-widget === )
The official readme.txt might help

featured-comment-widget/featured-comment-widget.php 92% from 13 tests

This is the main PHP file of "Featured Comment Widget" version 1.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 188 characters long)

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
There were no executable files found in this plugin105 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13323105

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.19MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png11.98KB4.82KB▼ 59.77%
screenshot-5.png21.00KB6.96KB▼ 66.84%
screenshot-3.png35.20KB10.51KB▼ 70.13%
screenshot-6.png40.97KB11.38KB▼ 72.22%
screenshot-1.png70.01KB25.06KB▼ 64.21%