74% client-ip-detector

Code Review | Client IP Detector Plugin

WordPress plugin Client IP Detector Plugin scored 74% from 54 tests.

About plugin

  • Plugin page: client-ip-detector
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-3.5
  • WordPress version: 5.8.1
  • First release: Dec 17, 2012
  • Latest release: Dec 17, 2012
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: alessiobravi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,370 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼1.62MB] [CPU: ▼186.34ms] Passed 4 tests

An overview of server-side resources used by Client IP Detector Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.01 ▼0.8310.14 ▼24.90
Dashboard /wp-admin2.03 ▼1.0311.75 ▼33.85
Posts /wp-admin/edit.php2.03 ▼1.0810.54 ▼51.12
Add New Post /wp-admin/post-new.php2.03 ▼3.4010.63 ▼635.47
Media Library /wp-admin/upload.php2.03 ▼0.9711.60 ▼22.34

Server storage [IO: ▲0.02MB] [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, 3 new options
New WordPress options
IPv6_counter
IPv4_counter
widget_client-ip-detector-widget

Browser metrics Passed 4 tests

An overview of browser requirements for Client IP Detector Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.83 ▼0.1410.28 ▼0.9947.20 ▼2.60
Dashboard /wp-admin2,973 ▲365.92 ▼0.24144.54 ▼13.42108.95 ▼11.25
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0073.67 ▼25.8184.04 ▼19.81
Add New Post /wp-admin/post-new.php1,676 ▼718.92 ▲0.10412.80 ▲7.23109.16 ▼3.10
Media Library /wp-admin/upload.php1,810 ▲595.00 ▲0.02147.23 ▼0.24115.37 ▼6.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method Client_IP_Detector_Widget::register() should not be called statically
  • This plugin does not fully uninstall, leaving 3 options in the database
    • widget_client-ip-detector-widget
    • IPv6_counter
    • IPv4_counter

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/client-ip-detector/client-ip-detector.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (ScreenShot of placed client-ip-detector on a WordPress powered WebSite. (Widget Output.jpg))
The official readme.txt might help

client-ip-detector/client-ip-detector.php Passed 13 tests

"Client IP Detector Plugin" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
100 characters long description:
A Simple widget to display client IP Address and print if the client is connecting via IPv6 or IPv4.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected85 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110985

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There are no PNG files in this plugin