79% who-is-online-now

Code Review | Who Is Online Now

WordPress plugin Who Is Online Now scored 79% from 54 tests.

About plugin

  • Plugin page: who-is-online-now
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 5.8.1
  • First release: Nov 19, 2018
  • Latest release: Jan 2, 2020
  • Number of updates: 9
  • Update frequency: every 45.6 days
  • Top authors: wpmonkeys (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 2,193 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼142.72ms] Passed 4 tests

An overview of server-side resources used by Who Is Online Now
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.1248.26 ▲9.84
Dashboard /wp-admin3.19 ▲0.1348.27 ▲0.38
Posts /wp-admin/edit.php3.30 ▲0.1946.67 ▼3.08
Add New Post /wp-admin/post-new.php5.54 ▲0.1190.60 ▼574.74
Media Library /wp-admin/upload.php3.13 ▲0.1333.32 ▲6.57
Who Is Online /wp-admin/options-general.php?page=wpmwo_settings_page3.1028.47

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: 1 new table, 2 new options
New tables
wp_online_visitors
New WordPress options
wpmwo_string_setting_sec
wpmwo_general_setting_sec

Browser metrics Passed 4 tests

Who Is Online Now: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,849 ▲27716.46 ▲0.7213.41 ▲1.8946.13 ▼0.44
Dashboard /wp-admin2,994 ▲636.53 ▲0.54145.19 ▼17.15109.75 ▲4.61
Posts /wp-admin/edit.php2,791 ▲523.04 ▲0.3373.83 ▲6.51102.55 ▲18.81
Add New Post /wp-admin/post-new.php1,639 ▼4421.45 ▲2.66287.00 ▼103.48110.08 ▼15.07
Media Library /wp-admin/upload.php1,850 ▲435.22 ▲0.20144.87 ▼0.10114.13 ▲1.78
Who Is Online /wp-admin/options-general.php?page=wpmwo_settings_page1,3412.7976.6274.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_online_visitors
  • Zombie WordPress options detected upon uninstall: 2 options
    • wpmwo_string_setting_sec
    • wpmwo_general_setting_sec

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

who-is-online-now/index.php 85% from 13 tests

"Who Is Online Now" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("who-is-online-now.php" instead of "index.php")
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

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
Good job! No executable or dangerous file extensions detected646 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6162177609
CSS15025
JavaScript10212

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity23.00
▷ Minimum class complexity3.00
▷ Maximum class complexity43.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin