10% visitors-right-now-uk

Code Review | Visitors Right Now Counter

WordPress plugin Visitors Right Now Counter scored10%from 54 tests.

About plugin

  • Plugin page: visitors-right-no...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Jun 4, 2020
  • Latest release: Aug 26, 2020
  • Number of updates: 3
  • Update frequency: every 28.3 days
  • Top authors: visitorsrightnowplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /423 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/visitors-right-now-uk/classes/class.visitors.php+360
    Undefined variable: charset_collate

Server metrics [RAM: ▼1.16MB] [CPU: ▼47.10ms] Passed 4 tests

A check of server-side resources used by Visitors Right Now Counter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.6514.30 ▼28.21
Dashboard /wp-admin2.86 ▼0.4919.53 ▼43.04
Posts /wp-admin/edit.php2.86 ▼0.5019.98 ▼29.67
Add New Post /wp-admin/post-new.php2.86 ▼3.0318.00 ▼87.46
Media Library /wp-admin/upload.php2.86 ▼0.3718.38 ▼24.62
Visitors Right Now /wp-admin/tools.php?page=visitors2.8617.90

Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • Illegal file modification found: 2 files (3.75KB) outside of "wp-content/plugins/visitors-right-now-uk/" and "wp-content/uploads/"
    • (modified) .htaccess
    • (new file) robots.txt
Filesystem: 14 new files
Database: 2 new tables, 6 new options
New tables
wp_visitor_counter
wp_vnr_visitors
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Visitors Right Now Counter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲7813.63 ▼0.981.83 ▲0.0837.85 ▼1.26
Dashboard /wp-admin2,228 ▲405.02 ▼0.87106.88 ▲8.4741.11 ▲0.75
Posts /wp-admin/edit.php2,120 ▲312.41 ▲0.4039.80 ▲2.9729.91 ▼8.82
Add New Post /wp-admin/post-new.php1,538 ▲2423.27 ▲5.67747.77 ▲76.7862.24 ▲9.50
Media Library /wp-admin/upload.php1,407 ▲194.41 ▲0.1597.49 ▼18.0543.42 ▼6.09
Visitors Right Now /wp-admin/tools.php?page=visitors1,0131.9331.4932.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/visitors-right-now-uk/classes/class.visitors.php+49
    Undefined index: hcawp_get_posts_and_pages
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_visitor_counter
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/tools.php?page=visitors
    • > Notice in wp-content/plugins/visitors-right-now-uk/classes/class.visitors.php+49
    Undefined index: hcawp_get_posts_and_pages

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 smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === visitors-right-now-uk === )
  • Screenshots: Add an image for screenshot #1 (Plugin Settings.)
  • Donate link: Invalid URI found ("www.visitorsrightnow.co.uk")
The official readme.txt is a good inspiration

visitors-right-now-uk/visitors-right-now.php 92% from 13 tests

The main PHP script in "Visitors Right Now Counter" version 1.3.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("visitors-right-now-uk.php" instead of "visitors-right-now.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,040 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP730685437
CSS24214357
JavaScript3398246

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods20100.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants5
▷ Global constants5100.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