89% show-visitor-ip-address-widget-and-shortcode

Code Review | Show Visitor IP Address - Widget and Shortcode

WordPress plugin Show Visitor IP Address - Widget and Shortcode scored89%from 54 tests.

About plugin

  • Plugin page: show-visitor-ip-a...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.2.4
  • WordPress version: 6.3.1
  • First release: Dec 10, 2019
  • Latest release: Dec 10, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: getseofix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /690 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.02MB] [CPU: ▼3.09ms] Passed 4 tests

This is a short check of server-side resources used by Show Visitor IP Address - Widget and Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.27 ▼1.90
Dashboard /wp-admin3.33 ▲0.0247.38 ▼2.71
Posts /wp-admin/edit.php3.38 ▲0.0243.37 ▼4.05
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.26 ▼3.62
Media Library /wp-admin/upload.php3.25 ▲0.0233.67 ▼1.96

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 10 new options
New WordPress options
widget_show_ip
Show_IPInputField2
widget_recent-posts
Show_IPInputField1
theysaidso_admin_options
can_compress_scripts
Show_IPInputField3
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Show Visitor IP Address - Widget and Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10514.47 ▼0.281.97 ▲0.1143.98 ▲2.78
Dashboard /wp-admin2,224 ▲395.86 ▼0.02112.90 ▲8.3567.05 ▲22.59
Posts /wp-admin/edit.php2,104 ▲152.03 ▲0.0136.63 ▲2.2932.07 ▼7.78
Add New Post /wp-admin/post-new.php1,536 ▲2218.19 ▲0.54647.57 ▼27.1274.74 ▲11.57
Media Library /wp-admin/upload.php1,406 ▲214.18 ▲0.0095.12 ▼8.9380.13 ▲35.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_show_ip
    • Show_IPInputField3
    • theysaidso_admin_options
    • can_compress_scripts
    • Show_IPInputField1
    • db_upgraded
    • widget_recent-posts
    • Show_IPInputField2
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: show ip, visitor ip, ip address, ip

show-visitor-ip-address-widget-and-shortcode/ShowIP-GSF.php 92% from 13 tests

The primary PHP file in "Show Visitor IP Address - Widget and Shortcode" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("show-visitor-ip-address-widget-and-shortcode.php" instead of "ShowIP-GSF.php")

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
Success! There were no dangerous files found in this plugin198 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35042198

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.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 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.73MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png59.83KB20.51KB▼ 65.72%
screenshot-1.png478.74KB150.16KB▼ 68.64%
promo.png36.28KB11.11KB▼ 69.38%
screenicon.png9.01KB4.09KB▼ 54.63%
screenshot-3.png133.41KB42.14KB▼ 68.42%