78% user-ip-information

Code Review | User IP Info

WordPress plugin User IP Info scored78%from 54 tests.

About plugin

  • Plugin page: user-ip-information
  • Plugin version: 10.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Oct 9, 2019
  • Latest release: Oct 9, 2019
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: adeelsikander (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /727 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by User IP Info
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0150.55 ▲7.93
Dashboard /wp-admin3.33 ▲0.0248.52 ▼6.78
Posts /wp-admin/edit.php3.38 ▲0.0265.48 ▲13.15
Add New Post /wp-admin/post-new.php5.91 ▲0.02107.00 ▲14.12
Media Library /wp-admin/upload.php3.25 ▲0.0236.71 ▼0.47
User IP Info /wp-admin/options-general.php?page=user-ip-info3.1932.85

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
uiin_option_name
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

User IP Info: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.54 ▼0.844.38 ▲2.1144.60 ▲1.61
Dashboard /wp-admin2,210 ▲225.86 ▼0.02108.96 ▼2.0843.25 ▼4.33
Posts /wp-admin/edit.php2,098 ▲122.02 ▲0.0340.89 ▲1.9336.04 ▲1.23
Add New Post /wp-admin/post-new.php1,540 ▲723.43 ▲0.32672.20 ▼5.2057.86 ▲5.45
Media Library /wp-admin/upload.php1,392 ▲44.27 ▼0.02107.05 ▼0.9049.19 ▼2.87
User IP Info /wp-admin/options-general.php?page=user-ip-info7882.0327.1428.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • uiin_option_name
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=user-ip-info
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=user-ip-info
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-ip-information/user-ip-info.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

user-ip-information/user-ip-info.php 92% from 13 tests

The main PHP script in "User IP Info" version 10.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("user-ip-information.php" instead of "user-ip-info.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected81 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2512481

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin