84% top-commentators-widget

Code Review | Top Commentators Widget

WordPress plugin Top Commentators Widget scored84%from 54 tests.

About plugin

  • Plugin page: top-commentators-...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.0
  • WordPress version: 6.3.1
  • First release: Oct 4, 2007
  • Latest release: Jul 13, 2022
  • Number of updates: 67
  • Update frequency: every 82.2 days
  • Top authors: webgrrrl (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /153,866 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Top Commentators Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.18 ▲1.45
Dashboard /wp-admin3.32 ▼0.0343.33 ▼10.57
Posts /wp-admin/edit.php3.37 ▲0.0143.90 ▲0.72
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.24 ▲4.43
Media Library /wp-admin/upload.php3.24 ▲0.0134.72 ▼1.03

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_topcomm-widget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Top Commentators Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.10 ▼0.491.79 ▲0.1439.53 ▲2.16
Dashboard /wp-admin2,192 ▲115.51 ▼0.1985.09 ▼13.9336.38 ▼4.28
Posts /wp-admin/edit.php2,097 ▼02.00 ▼0.0433.29 ▼1.5434.44 ▲0.44
Add New Post /wp-admin/post-new.php1,531 ▲523.11 ▲0.17595.23 ▼14.9350.86 ▼16.54
Media Library /wp-admin/upload.php1,391 ▼124.22 ▼0.0194.61 ▼4.4040.56 ▲0.10

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_topcomm-widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/top-commentators-widget/top-commentators-widget.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: seo, sidebar, gravatar, widget, comments

top-commentators-widget/top-commentators-widget.php Passed 13 tests

The main PHP file in "Top Commentators Widget" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
110 characters long description:
Adds a sidebar widget to show the top commentators in your WP site. Adapted from Show Top Commentators plugin.

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

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity77.00
▷ Minimum class complexity77.00
▷ Maximum class complexity77.00
Average method complexity20.00
▷ Minimum method complexity1.00
▷ Maximum method complexity38.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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin