79% realtime-comments

Code Review | Realtime Comments

WordPress plugin Realtime Comments scored 79% from 54 tests.

About plugin

  • Plugin page: realtime-comments
  • Plugin version: 0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Oct 10, 2014
  • Latest release: Feb 13, 2016
  • Number of updates: 38
  • Update frequency: every 12.9 days
  • Top authors: Eero Hermlin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,141 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
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼1.84ms] Passed 4 tests

Analyzing server-side resources used by Realtime Comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1647.11 ▲1.07
Dashboard /wp-admin3.47 ▲0.1745.63 ▼8.28
Posts /wp-admin/edit.php3.59 ▲0.2347.61 ▲2.71
Add New Post /wp-admin/post-new.php6.07 ▲0.1994.21 ▼2.84
Media Library /wp-admin/upload.php3.40 ▲0.1737.60 ▲2.87

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: 1 new table, 8 new options
New tables
wp_rtc_cache
New WordPress options
widget_theysaidso_widget
rtc-version
widget_recent-comments
widget_recent-posts
can_compress_scripts
rtc-settings
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Realtime Comments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲19514.14 ▼0.086.14 ▲3.7540.00 ▼10.50
Dashboard /wp-admin2,222 ▲314.85 ▼0.03108.95 ▲1.4641.99 ▼6.31
Posts /wp-admin/edit.php2,105 ▲162.02 ▲0.0140.17 ▼2.1635.53 ▲0.64
Add New Post /wp-admin/post-new.php1,537 ▲318.23 ▼4.77624.59 ▼8.8856.03 ▼3.46
Media Library /wp-admin/upload.php1,398 ▲104.20 ▲0.0196.59 ▼9.5640.51 ▼3.85

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • rtc-version
    • db_upgraded
    • widget_theysaidso_widget
    • rtc-settings

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/realtime-comments/ajax.php
    • > /wp-content/plugins/realtime-comments/realtime-comments.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_page' not found in wp-content/plugins/realtime-comments/rtc-page-selector-walker.class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
10 plugin tags: interactive, comments, real time, update, chat...

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

The principal PHP file in "Realtime Comments" v. 0.8 is loaded by WordPress automatically on each request
147 characters long description:
Accepted comments from users are added to pages in real-time, without need to refresh. Makes comments section work interactively, like a chatroom.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected966 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4155118737
JavaScript22236222
CSS2107

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity35.67
▷ Minimum class complexity4.00
▷ Maximum class complexity79.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods47
▷ Static methods1634.04%
▷ Public methods4085.11%
▷ Protected methods00.00%
▷ Private methods714.89%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 files were detected