84% display-live-visitors-counter

Code Review | Display Live Visitors & Counter

WordPress plugin Display Live Visitors & Counter scored 84% from 54 tests.

About plugin

  • Plugin page: display-live-visi...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2020
  • Latest release: Jul 17, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: rajdipsinharoy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,113 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▲5.56ms] Passed 4 tests

Server-side resources used by Display Live Visitors & Counter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1045.90 ▲3.93
Dashboard /wp-admin3.38 ▲0.0755.24 ▲5.54
Posts /wp-admin/edit.php3.49 ▲0.1359.96 ▲12.86
Add New Post /wp-admin/post-new.php5.95 ▲0.06100.75 ▲7.09
Media Library /wp-admin/upload.php3.29 ▲0.0738.69 ▲5.66

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_whois-disp
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Display Live Visitors & Counter: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11013.19 ▼1.401.57 ▼0.3340.60 ▼5.48
Dashboard /wp-admin2,251 ▲634.89 ▲0.01109.20 ▲9.9343.16 ▼0.71
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0139.63 ▲2.9937.07 ▲4.67
Add New Post /wp-admin/post-new.php1,542 ▲718.24 ▼4.83597.75 ▼52.1448.16 ▼12.95
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0396.44 ▼2.1743.60 ▼1.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_whois-disp
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/display-live-visitors-counter/display-live-visitors-counter.php:226

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: counter, users online, live, visitors, display...

display-live-visitors-counter/display-live-visitors-counter.php Passed 13 tests

The main file in "Display Live Visitors & Counter" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
54 characters long description:
Show How Many Users Are Online On Your Wordpress Site.

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
No dangerous file extensions were detected223 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16116223

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity12.00
▷ Minimum class complexity4.00
▷ Maximum class complexity20.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods1071.43%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected