68% web3onlineusers

Code Review | web3onlineusers

WordPress plugin web3onlineusers scored68%from 54 tests.

About plugin

  • Plugin page: web3onlineusers
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1
  • WordPress version: 6.3.1
  • First release: Aug 24, 2023
  • Latest release: Aug 24, 2023
  • Number of updates: 2
  • Update frequency: every 48.0 days
  • Top authors: 2themoontech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /51 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼13.55ms] Passed 4 tests

A check of server-side resources used by web3onlineusers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0627.81 ▼14.86
Dashboard /wp-admin3.34 ▼0.0148.29 ▼20.07
Posts /wp-admin/edit.php3.39 ▲0.0350.23 ▼1.06
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.04 ▼15.89
Media Library /wp-admin/upload.php3.26 ▲0.0332.98 ▼3.36
Web3 Online Users /wp-admin/admin.php?page=web3onlineusers_tracker3.2332.46
Web3Plugins /wp-admin/admin.php?page=web3plugins3.2034.24

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: 1 new table, 6 new options
New tables
web3onlineusers_tlist
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

web3onlineusers: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,488 ▼27314.13 ▼0.100.90 ▼1.1116.87 ▼25.86
Dashboard /wp-admin2,218 ▲385.57 ▼0.0588.34 ▲0.4239.61 ▼0.45
Posts /wp-admin/edit.php2,105 ▲52.04 ▲0.0136.14 ▼1.5633.97 ▲0.48
Add New Post /wp-admin/post-new.php1,550 ▲1423.43 ▲0.32681.70 ▲61.3461.82 ▲5.33
Media Library /wp-admin/upload.php1,417 ▲174.22 ▲0.0499.86 ▼1.0746.81 ▲0.52
Web3 Online Users /wp-admin/admin.php?page=web3onlineusers_tracker8431.8928.1253.12
Web3Plugins /wp-admin/admin.php?page=web3plugins7971.9923.4131.52

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
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • web3onlineusers_tlist
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=web3onlineusers_tracker
    • > POST request to /wp-admin/admin-ajax.php?action=web3onlineusers_trackerlive
    • > Notice in wp-content/plugins/web3onlineusers/web3onlineusers.php+87
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=web3onlineusers_tracker
    • > POST request to /wp-admin/admin-ajax.php?action=web3onlineusers_trackerlive
    • > Notice in wp-content/plugins/web3onlineusers/web3onlineusers.php+87
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=web3plugins
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'web3plugins' not found or invalid function name

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/web3onlineusers/view/showonlineusers.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt is a good inspiration

web3onlineusers/web3onlineusers.php Passed 13 tests

"web3onlineusers" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
15 characters long description:
web3onlineusers

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin122 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP37713120
CSS1051
JavaScript10121

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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 files were detected