83% fake-whos-online-widget

Code Review | Fake Who's Online for WordPress

WordPress plugin Fake Who's Online for WordPress scored83%from 54 tests.

About plugin

  • Plugin page: fake-whos-online-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4
  • WordPress version: 6.3.1
  • First release: Jan 4, 2016
  • Latest release: Sep 6, 2019
  • Number of updates: 23
  • Update frequency: every 58.8 days
  • Top authors: paulsimonrough (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,686 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.07ms] Passed 4 tests

Analyzing server-side resources used by Fake Who's Online for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.41 ▲2.47
Dashboard /wp-admin3.33 ▲0.0350.99 ▼2.90
Posts /wp-admin/edit.php3.38 ▲0.0254.19 ▲2.68
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.42 ▼23.91
Media Library /wp-admin/upload.php3.25 ▲0.0238.28 ▲0.06

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_fake_whos_online_for_wp
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Fake Who's Online for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.59 ▲0.311.73 ▲0.0640.86 ▼1.94
Dashboard /wp-admin2,198 ▲185.63 ▲0.0282.71 ▼6.2942.07 ▼2.45
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0840.13 ▼3.0639.75 ▲1.00
Add New Post /wp-admin/post-new.php1,531 ▲523.07 ▲0.16687.54 ▲72.4053.62 ▼5.10
Media Library /wp-admin/upload.php1,403 ▲64.18 ▼0.12104.36 ▼1.2043.54 ▼2.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_fake_whos_online_for_wp
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fake-whos-online-widget/fakewhosonlinewp.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === fake-whos-online-widget === )
  • Screenshots: A description for screenshot #1 is missing in fake-whos-online-widget/assets to your readme.txt
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

fake-whos-online-widget/fakewhosonlinewp.php 92% from 13 tests

The main PHP file in "Fake Who's Online for WordPress" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("fake-whos-online-widget.php" instead of "fakewhosonlinewp.php")

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
Everything looks great! No dangerous files found in this plugin57 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP120957

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin