83% free-ip-lookup-widget

Code Review | Free IP Lookup Widget

WordPress plugin Free IP Lookup Widget scored 83% from 54 tests.

About plugin

  • Plugin page: free-ip-lookup-wi...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9
  • WordPress version: 5.8.1
  • First release: Jul 14, 2018
  • Latest release: Jul 14, 2018
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: hidemyipvpn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 550 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼139.23ms] Passed 4 tests

This is a short check of server-side resources used by Free IP Lookup Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1539.16 ▲14.14
Dashboard /wp-admin3.09 ▲0.0344.45 ▼5.28
Posts /wp-admin/edit.php3.14 ▲0.0344.99 ▲4.08
Add New Post /wp-admin/post-new.php5.46 ▲0.0295.67 ▼552.51
Media Library /wp-admin/upload.php3.03 ▲0.0238.04 ▼3.20

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 249 new files
Database: no new tables, 1 new option
New WordPress options
widget_wpb_widget_free_ip_lookup

Browser metrics Passed 4 tests

An overview of browser requirements for Free IP Lookup Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,691 ▲9516.22 ▲0.948.10 ▼4.1448.77 ▼1.76
Dashboard /wp-admin2,966 ▲356.05 ▲0.14145.68 ▼9.84118.19 ▼11.44
Posts /wp-admin/edit.php2,736 ▼32.81 ▲0.1168.40 ▼1.2893.15 ▼11.35
Add New Post /wp-admin/post-new.php1,683 ▼014.40 ▼4.36409.61 ▲14.08108.74 ▼12.62
Media Library /wp-admin/upload.php1,807 ▲745.01 ▼0.02192.36 ▲36.72152.70 ▲14.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_wpb_widget_free_ip_lookup

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/free-ip-lookup-widget/free-ip-lookup-widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

free-ip-lookup-widget/free-ip-lookup-widget.php 85% from 13 tests

Analyzing the main PHP file in "Free IP Lookup Widget" version 1.2
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin230 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15421166
CSS110161
Markdown1103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions4
▷ Named functions4100.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
244 compressed PNG files occupy 0.18MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flags/TT.png0.95KB1.13KB0.00%
images/flags/PS.png0.73KB0.80KB0.00%
images/flags/AE.png0.79KB0.87KB0.00%
images/flags/PY.png0.61KB0.76KB0.00%
images/flags/SB.png0.92KB1.08KB0.00%