84% ihs-geo-location

Code Review | IHS Geo Location

WordPress plugin IHS Geo Location scored84%from 54 tests.

About plugin

  • Plugin page: ihs-geo-location
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 6.3.1
  • First release: Mar 14, 2018
  • Latest release: Dec 25, 2020
  • Number of updates: 6
  • Update frequency: every 169.5 days
  • Top authors: gsayed786 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /2,774 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.45ms] Passed 4 tests

Analyzing server-side resources used by IHS Geo Location
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0247.75 ▲11.79
Dashboard /wp-admin3.32 ▼0.0249.19 ▼10.07
Posts /wp-admin/edit.php3.37 ▲0.0249.16 ▲1.65
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.78 ▼10.65
Media Library /wp-admin/upload.php3.24 ▲0.0236.50 ▲1.28

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

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

Browser metrics Passed 4 tests

Checking browser requirements for IHS Geo Location
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲14613.99 ▼0.6610.10 ▲8.1743.94 ▲6.33
Dashboard /wp-admin2,209 ▲215.85 ▼0.03109.72 ▲11.1242.31 ▼0.65
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0033.24 ▼5.8433.46 ▼4.21
Add New Post /wp-admin/post-new.php1,533 ▲1923.25 ▼0.11634.96 ▼46.4460.95 ▲14.08
Media Library /wp-admin/upload.php1,379 ▼94.20 ▲0.0697.55 ▼18.0344.56 ▼3.53

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ihs-geo-location/custom-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ihs-geo-location/custom-functions.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: location, address, geolocation, geo, country...

ihs-geo-location/ihs-geo-location.php 85% from 13 tests

The main file in "IHS Geo Location" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin214 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1152987
PHP2236380
CSS15347

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin