74% show-ip-address

Code Review | Show IP address

WordPress plugin Show IP address scored74%from 54 tests.

About plugin

  • Plugin page: show-ip-address
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 17, 2015
  • Latest release: May 19, 2023
  • Number of updates: 54
  • Update frequency: every 53.6 days
  • Top authors: Keithgriffiths76 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /17,237 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.97MB] [CPU: ▼55.68ms] Passed 4 tests

A check of server-side resources used by Show IP address
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.55 ▼37.71
Dashboard /wp-admin2.05 ▼1.305.10 ▼57.23
Posts /wp-admin/edit.php2.05 ▼1.315.61 ▼41.53
Add New Post /wp-admin/post-new.php2.05 ▼3.845.10 ▼86.24
Media Library /wp-admin/upload.php2.05 ▼1.185.58 ▼26.88

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Show IP address: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲12513.17 ▼1.293.77 ▲2.0542.00 ▼1.63
Dashboard /wp-admin2,273 ▲824.86 ▲0.00108.20 ▼11.0948.92 ▲4.41
Posts /wp-admin/edit.php2,107 ▲392.02 ▼0.0440.00 ▲1.1134.49 ▼0.75
Add New Post /wp-admin/post-new.php1,543 ▲2923.38 ▲5.81584.49 ▼101.9858.61 ▼2.24
Media Library /wp-admin/upload.php1,406 ▲184.21 ▲0.0196.77 ▼4.5840.87 ▼3.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the custom-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/show-ip-address/show-ip-address.php:25

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 97% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Display short code2. Dashboard3. Short code in a widget)
The official readme.txt might help

show-ip-address/show-ip-address.php Passed 13 tests

This is the main PHP file of "Show IP address" version 1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
132 characters long description:
A simple plugin to show your IP address information on any of your pages, posts or widgets. Shows your IP address on your Dashboard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected71 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP242960
CSS10111

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin