79% ip-geolocation-info

Code Review | IP Geolocation info

WordPress plugin IP Geolocation info scored79%from 54 tests.

About plugin

  • Plugin page: ip-geolocation-info
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Jun 13, 2019
  • Latest release: Jun 13, 2019
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: whoisxmlapi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /538 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.99ms] Passed 4 tests

Analyzing server-side resources used by IP Geolocation info
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.79 ▼3.11
Dashboard /wp-admin3.35 ▲0.0444.60 ▼9.10
Posts /wp-admin/edit.php3.46 ▲0.1148.02 ▼0.02
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.67 ▼18.66
Media Library /wp-admin/upload.php3.27 ▲0.0434.25 ▼1.09
IP Geolocation Info settings /wp-admin/options-general.php?page=ip-geolocation-info3.2430.34

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

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

Browser metrics Passed 4 tests

Checking browser requirements for IP Geolocation info
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲18015.71 ▲1.3315.90 ▲14.2235.42 ▼8.00
Dashboard /wp-admin2,210 ▲254.86 ▼0.02106.93 ▲2.1340.81 ▼3.54
Posts /wp-admin/edit.php2,093 ▲72.05 ▲0.0539.00 ▲2.6735.74 ▲3.91
Add New Post /wp-admin/post-new.php1,541 ▲2223.40 ▲0.12576.26 ▼84.8747.83 ▼5.57
Media Library /wp-admin/upload.php1,392 ▲44.30 ▲0.1796.35 ▼21.5641.36 ▼6.98
IP Geolocation Info settings /wp-admin/options-general.php?page=ip-geolocation-info7922.0625.9428.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 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 0% 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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ip-geolocation-info/ip-geolocation-info.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ip-geolocation-info/src/WhoisXmlApiCom_Geoip_Plugin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: geolocation, whoisxmlapi, content, ip, comments...

ip-geolocation-info/ip-geolocation-info.php Passed 13 tests

The main PHP script in "IP Geolocation info" version 1.0.1 is automatically included on every request by WordPress
63 characters long description:
Add IP geolocation tooltips to the comments and article content

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 plugin2,943 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript27331,2142,368
CSS36344325
PHP35713250

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.00
▷ Minimum class complexity8.00
▷ Maximum class complexity10.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1785.00%
▷ Protected methods315.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected