10% ipgp-geolocation

Code Review | IPGP Geolocation

WordPress plugin IPGP Geolocation scored10%from 54 tests.

About plugin

  • Plugin page: ipgp-geolocation
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 18, 2015
  • Latest release: Feb 4, 2023
  • Number of updates: 16
  • Update frequency: every 168.6 days
  • Top authors: thedark (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /3,730 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/ipgp-geolocation/install.php+25
    Use of undefined constant body - assumed 'body' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.81ms] Passed 4 tests

Analyzing server-side resources used by IPGP Geolocation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.53 ▼2.72
Dashboard /wp-admin3.36 ▲0.0650.72 ▼6.13
Posts /wp-admin/edit.php3.42 ▲0.0649.33 ▼3.78
Add New Post /wp-admin/post-new.php5.97 ▲0.0890.02 ▼18.62
Media Library /wp-admin/upload.php3.29 ▲0.0639.34 ▲1.99

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

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

Browser metrics Passed 4 tests

IPGP Geolocation: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12913.43 ▼1.008.62 ▲6.9343.31 ▲0.22
Dashboard /wp-admin2,213 ▲395.66 ▲0.0590.26 ▼8.9844.29 ▲1.22
Posts /wp-admin/edit.php2,118 ▲211.98 ▼0.0535.56 ▼4.6734.40 ▼2.82
Add New Post /wp-admin/post-new.php1,614 ▲8823.69 ▲0.08669.10 ▼16.3752.44 ▼4.38
Media Library /wp-admin/upload.php1,418 ▲244.20 ▼0.00100.79 ▼8.6046.00 ▲2.18

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ipgp-geolocation/ipgp-geolocation.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === ipgp-geolocation === )
You can look at the official readme.txt

ipgp-geolocation/ipgp-geolocation.php Passed 13 tests

This is the main PHP file of "IPGP Geolocation" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
90 characters long description:
Show different content based on user location, or to redirect certain users to another url

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin504 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP48523461
JavaScript115243

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
No PNG images were found in this plugin