84% current-comments

Code Review | Current Comments

WordPress plugin Current Comments scored 84% from 54 tests.

About plugin

  • Plugin page: current-comments
  • Plugin version: 0.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6
  • WordPress version: 6.3.1
  • First release: Jun 1, 2013
  • Latest release: Feb 8, 2014
  • Number of updates: 10
  • Update frequency: every 25.4 days
  • Top authors: allendav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,548 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.02MB] [CPU: ▼0.10ms] Passed 4 tests

This is a short check of server-side resources used by Current Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.29 ▼2.06
Dashboard /wp-admin3.32 ▲0.0249.95 ▲1.32
Posts /wp-admin/edit.php3.37 ▲0.0246.38 ▲2.32
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.92 ▼0.65
Media Library /wp-admin/upload.php3.24 ▲0.0232.86 ▲0.97

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

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

Browser metrics Passed 4 tests

Current Comments: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲18514.13 ▼0.1912.09 ▲10.2743.70 ▼4.21
Dashboard /wp-admin2,209 ▲215.93 ▲1.0399.90 ▼13.5741.36 ▼6.05
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0433.85 ▼0.5134.09 ▼3.34
Add New Post /wp-admin/post-new.php1,533 ▲1923.34 ▲5.87662.94 ▲13.4261.01 ▲5.21
Media Library /wp-admin/upload.php1,391 ▲64.21 ▼0.08101.70 ▲4.4244.56 ▲1.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_current-comments-widget
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/current-comments/current-comments-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/current-comments/current-comments-widget.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #1 (The current comment widget - it's alive!) image missing
You can take inspiration from this readme.txt

current-comments/current-comments.php Passed 13 tests

The main file in "Current Comments" v. 0.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
58 characters long description:
Live comments widget for WordPress, powered by Backbone.js

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 detected208 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2258106
PHP23552102

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png26.54KB8.56KB▼ 67.75%