77% visitors-info

Code Review | Visitors Info

WordPress plugin Visitors Info scored 77% from 54 tests.

About plugin

  • Plugin page: visitors-info
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2013
  • Latest release: Jul 24, 2013
  • Number of updates: 15
  • Update frequency: every 0.1 days
  • Top authors: angrejkumar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,019 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.38ms] Passed 4 tests

A check of server-side resources used by Visitors Info
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.35 ▼6.79
Dashboard /wp-admin3.33 ▲0.0245.62 ▼7.50
Posts /wp-admin/edit.php3.38 ▲0.0248.17 ▼2.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.16 ▼5.06
Media Library /wp-admin/upload.php3.25 ▲0.0236.15 ▲2.57
Settings /wp-admin/admin.php?page=vi_settings3.2632.03
Visitors Info /wp-admin/admin.php?page=vi_visitors3.2632.74

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: 1 new table, 9 new options
New tables
wp_visitors_info
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
vi_settings
widget_recent-posts
recovery_mode_email_last_sent
theysaidso_admin_options
widget_theysaidso_widget
vi_db_table_version

Browser metrics Passed 4 tests

Visitors Info: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲17813.61 ▼0.682.36 ▲0.5338.63 ▼1.79
Dashboard /wp-admin2,232 ▲444.91 ▲0.03106.91 ▲0.9074.20 ▲29.58
Posts /wp-admin/edit.php2,118 ▲292.02 ▲0.0438.03 ▼4.3034.16 ▼1.46
Add New Post /wp-admin/post-new.php1,545 ▲322.89 ▲4.79730.55 ▲132.0853.48 ▼0.64
Media Library /wp-admin/upload.php1,414 ▲234.22 ▲0.0196.16 ▲0.6680.60 ▲37.85
Settings /wp-admin/admin.php?page=vi_settings1,5492.0324.1828.56
Visitors Info /wp-admin/admin.php?page=vi_visitors7831.148.2421.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • vi_db_table_version
    • vi_settings
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=vi_visitors
    • > Error in wp-content/plugins/visitors-info/visitors.php+47
    Uncaught Error: Call to undefined function mysql_query() in wp-content/plugins/visitors-info/visitors.php:47
    Stack trace:
    #0 wp-content/plugins/visitors-info/visitors.php(58): get_table_data()
    #1 wp-content/plugins/visitors-info/visitors-info.php(142): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): vi_visitors()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

SRP 50% from 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
Please take a closer look at the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/visitors-info/visitors-info.php:13
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/visitors-info/visitors.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/visitors-info/settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/visitors-info/popup.php:3
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/visitors-info/visitors.php on line 3

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 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
Please fix the following attributes:
  • Donate link: Invalid url: ""
  • Tags: No valid plugin tags found
  • Screenshots: These screenshots do not have images: #1 (Frontend View), #2 (Admin Settings Page), #3 (Admin Visitors View)
You can take inspiration from this readme.txt

visitors-info/visitors-info.php 92% from 13 tests

This is the main PHP file of "Visitors Info" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 176 characters long)

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 plugin625 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP58631410
CSS1110146
JavaScript10438
Markdown118031

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/visitors-icon-36.png3.96KB1.44KB▼ 63.54%
images/visitors-icon.png3.35KB0.79KB▼ 76.57%