68% visitors-online

Code Review | Visitors Online by BestWebSoft

WordPress plugin Visitors Online by BestWebSoft scored68%from 54 tests.

About plugin

  • Plugin page: visitors-online
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Jun 15, 2015
  • Latest release: Aug 11, 2023
  • Number of updates: 38
  • Update frequency: every 78.5 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active /71,230 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.96MB] [CPU: ▲13.84ms] Passed 4 tests

An overview of server-side resources used by Visitors Online by BestWebSoft
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.45 ▲0.9951.02 ▲16.51
Dashboard /wp-admin4.30 ▲0.9959.43 ▲7.33
Posts /wp-admin/edit.php4.35 ▲0.9961.48 ▲17.46
Add New Post /wp-admin/post-new.php6.84 ▲0.95103.21 ▲16.37
Media Library /wp-admin/upload.php4.16 ▲0.9347.76 ▲15.14

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 128 new files
Database: 4 new tables, 9 new options
New tables
wp_vstrsnln_general
wp_bws_list_countries
wp_vstrsnln_detailing
wp_bws_list_ip
New WordPress options
can_compress_scripts
bstwbsftwppdtplgns_options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
vstrsnln_options
widget_vstrsnln_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Visitors Online by BestWebSoft
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17514.17 ▼0.111.77 ▲0.2543.50 ▲1.97
Dashboard /wp-admin2,336 ▲1565.64 ▼0.0493.75 ▲6.5845.98 ▲4.44
Posts /wp-admin/edit.php2,204 ▲1042.22 ▲0.2138.99 ▲2.2937.24 ▲2.64
Add New Post /wp-admin/post-new.php1,630 ▲10418.20 ▼4.48588.57 ▼60.4476.58 ▲28.67
Media Library /wp-admin/upload.php1,494 ▲914.20 ▲0.0396.84 ▼2.1943.28 ▲1.04
BWS Panel /wp-admin/visitors-online.php?page=vstrsnln-bws-panel260.420.0813.05
Settings /wp-admin/visitors-online.php260.420.085.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_bws_list_countries
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/visitors-online/bws_menu/class-bws-settings.php:1452
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/visitors-online/bws_menu/product_list.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/visitors-online/visitors-online.php:925
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/visitors-online/includes/class-vstrsnln-settings.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/visitors-online.php?page=vstrsnln-bws-panel
    • > Network (severe)
    wp-admin/visitors-online.php?page=vstrsnln-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/visitors-online.php
    • > Network (severe)
    wp-admin/visitors-online.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (Displaying Visitors Online in the Sidebar on your WordPress website.), #2 (Displaying Visitors Online on the Dashboard.), #3 (Plugin Settings page.)
You can take inspiration from this readme.txt

visitors-online/visitors-online.php Passed 13 tests

The main file in "Visitors Online by BestWebSoft" v. 1.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
88 characters long description:
Display live count of online visitors who are currently browsing your WordPress website.

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
No dangerous file extensions were detected20,369 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PO File133,7775,5088,427
PHP105266495,631
CSS101892755,551
JavaScript827112610
SVG400150

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity61.25
▷ Minimum class complexity2.00
▷ Maximum class complexity210.00
Average method complexity9.61
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions81
▷ Named functions81100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
62 PNG files occupy 3.09MB with 1.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_glass_75_e6e6e6_1x400.png0.31KB0.18KB▼ 39.81%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_888888_256x240.png6.94KB4.18KB▼ 39.78%