83% site-visitor-info

Code Review | Site visitor Information

WordPress plugin Site visitor Information scored83%from 54 tests.

About plugin

  • Plugin page: site-visitor-info
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 6.3.1
  • First release: Sep 9, 2018
  • Latest release: Sep 9, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: usmanaltafwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /476 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.06ms] Passed 4 tests

Server-side resources used by Site visitor Information
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.80 ▼3.20
Dashboard /wp-admin3.34 ▲0.0444.21 ▼0.84
Posts /wp-admin/edit.php3.40 ▲0.0444.67 ▼0.83
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.94 ▼11.36
Media Library /wp-admin/upload.php3.27 ▲0.0434.05 ▼0.60

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: 1 new table, 6 new options
New tables
wp_visitor_details
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Site visitor Information: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.35 ▲0.001.58 ▼0.2236.32 ▼6.19
Dashboard /wp-admin2,211 ▲375.64 ▲0.0187.04 ▼17.8839.23 ▼1.99
Posts /wp-admin/edit.php2,116 ▲162.02 ▼0.0133.49 ▼6.5634.49 ▼3.46
Add New Post /wp-admin/post-new.php1,538 ▲1223.63 ▼0.05629.46 ▼56.2650.77 ▼9.97
Media Library /wp-admin/upload.php1,419 ▲194.21 ▼0.0795.09 ▼18.2741.18 ▼7.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/site-visitor-info/sitevisitor.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Donate link: Invalid URI ("usmanaltafwp@gmail.com")
  • Screenshots: Screenshot #1 (Redirect visitor from Nigeria to http://google.com.) image required
You can take inspiration from this readme.txt

site-visitor-info/sitevisitor.php 92% from 13 tests

"Site visitor Information" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("site-visitor-info.php" instead of "sitevisitor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin237 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25335237

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sign-ban.png1.35KB1.18KB▼ 11.97%
images/sign-check.png1.14KB0.94KB▼ 17.40%