10% online-users

Code Review | Online Users

WordPress plugin Online Users scored10%from 54 tests.

About plugin

  • Plugin page: online-users
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Jan 22, 2014
  • Latest release: Jan 22, 2014
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: gpenverne (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /3,245 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/online-users/class/uteUSBlogBuzzTime_widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; uteUSBlogBuzzTime_widget has a deprecated constructor

Server metrics [RAM: ▼1.72MB] [CPU: ▼54.85ms] Passed 4 tests

This is a short check of server-side resources used by Online Users
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.63 ▼36.47
Dashboard /wp-admin2.30 ▼1.0511.24 ▼57.31
Posts /wp-admin/edit.php2.30 ▼1.0612.07 ▼41.56
Add New Post /wp-admin/post-new.php2.30 ▼3.5910.87 ▼84.04
Media Library /wp-admin/upload.php2.30 ▼0.9311.24 ▼21.84

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_uteusblogbuzztime_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Online Users
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.061.82 ▼0.1143.51 ▲1.93
Dashboard /wp-admin2,198 ▲215.58 ▼0.0093.85 ▲1.2843.32 ▲5.20
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0339.07 ▲3.5734.31 ▼1.18
Add New Post /wp-admin/post-new.php1,526 ▼022.91 ▼0.52633.82 ▼37.9455.12 ▲3.97
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0695.37 ▼8.5843.51 ▲0.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in uteUSBlogBuzzTime_widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_uteusblogbuzztime_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/online-users/class/uteUSBlogBuzzTime_widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/online-users/class/uteUSBlogBuzzTime_widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: online users, real time, users, widget, online

online-users/onlineusers.php 85% from 13 tests

The principal PHP file in "Online Users" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("online-users.php" instead of "onlineusers.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin110 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42941110

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.50
▷ Minimum class complexity2.00
▷ Maximum class complexity3.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%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin