78% the-visitor-counter

Code Review | The Visitor Counter Plugin

WordPress plugin The Visitor Counter Plugin scored 78% from 54 tests.

About plugin

  • Plugin page: the-visitor-counter
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Aug 24, 2018
  • Latest release: Aug 26, 2020
  • Number of updates: 18
  • Update frequency: every 40.7 days
  • Top authors: thevisitorcounterplugin (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 26,948 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.84ms] Passed 4 tests

A check of server-side resources used by The Visitor Counter Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.50 ▼6.07
Dashboard /wp-admin3.37 ▲0.0650.14 ▲1.93
Posts /wp-admin/edit.php3.48 ▲0.1343.63 ▼2.54
Add New Post /wp-admin/post-new.php5.97 ▲0.0893.18 ▼0.67
Media Library /wp-admin/upload.php3.29 ▲0.0635.08 ▲2.94
The Visitor Counter /wp-admin/tools.php?page=visitors3.2629.68

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

A short overview of filesystem and database impact
Just a few items left to fix
  • Illegal file modification found: 2 files (3.75KB) outside of "wp-content/plugins/the-visitor-counter/" and "wp-content/uploads/"
    • (modified) .htaccess
    • (new file) robots.txt
Filesystem: 15 new files
Database: 1 new table, 7 new options
New tables
wp_vnr_visitors
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
widget_widget_visitors

Browser metrics Passed 4 tests

The Visitor Counter Plugin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.28 ▼1.311.96 ▲0.1443.82 ▼7.04
Dashboard /wp-admin2,208 ▲205.85 ▼0.05110.72 ▼1.8243.88 ▼3.03
Posts /wp-admin/edit.php2,094 ▲52.04 ▼0.0032.49 ▼1.8834.76 ▼0.18
Add New Post /wp-admin/post-new.php1,415 ▼11817.96 ▼5.53608.24 ▼86.1448.07 ▼5.37
Media Library /wp-admin/upload.php1,390 ▲24.22 ▲0.0396.46 ▼0.7543.54 ▼4.45
The Visitor Counter /wp-admin/tools.php?page=visitors1,0612.0734.9732.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_widget_visitors
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-visitor-counter/classes/class.widget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/tools.php?page=visitors
    • > Network (severe)
    https://cdn.visitorcounterplugin.com/?product=visitorcounterplugin&version=1696323861&ver=6.3.1 - Failed to load resource: the server responded with a status of 500 ()

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === the-visitor-counter === )
The official readme.txt might help

the-visitor-counter/the-visitor-counter.php Passed 13 tests

The main PHP script in "The Visitor Counter Plugin" version 1.4.3 is automatically included on every request by WordPress
44 characters long description:
Shows the number of active users on the site

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
No dangerous file extensions were detected575 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP69444379
CSS3161137
JavaScript37654
Markdown1105

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.50
▷ Minimum class complexity3.00
▷ Maximum class complexity22.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods1583.33%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin