93% geo-targetly-geo-redirect

Code Review | Geo Redirect

WordPress plugin Geo Redirect scored 93% from 53 tests.

About plugin

  • Plugin page: geo-targetly-geo-...
  • Plugin version: 5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 5.8.1
  • First release: Mar 20, 2018
  • Latest release: Oct 7, 2021
  • Number of updates: 20
  • Update frequency: every 64.9 days
  • Top authors: geotargetly (100%)

Code review

53 tests

User reviews

1 review

Install metrics

1,000+ active / 8,745 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼342.24ms] Passed 4 tests

Analyzing server-side resources used by Geo Redirect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.67 ▼0.0523.84 ▲4.52
Dashboard /wp-admin3.08 ▲0.0235.23 ▼9.26
Posts /wp-admin/edit.php3.13 ▲0.0237.90 ▼7.20
Add New Post /wp-admin/post-new.php5.44 ▲0.0189.27 ▼1,329.86
Media Library /wp-admin/upload.php3.02 ▲0.0232.54 ▼22.64

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Geo Redirect: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,693 ▲8715.89 ▲0.338.38 ▼0.8948.60 ▼2.37
Dashboard /wp-admin2,953 ▲1005.93 ▲0.01132.66 ▼29.09102.52 ▲6.21
Posts /wp-admin/edit.php2,726 ▲202.68 ▼0.0166.33 ▼1.5894.27 ▼2.19
Add New Post /wp-admin/post-new.php1,866 ▲1318.97 ▲0.00362.21 ▼2.01109.24 ▼3.99
Media Library /wp-admin/upload.php1,792 ▲205.02 ▼0.00136.98 ▼14.38104.33 ▼1.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.67MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/geo-targetly-geo-redirect/geotargetly-geo-redirect.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Plugin Name: Please specify the plugin name on the first line ( === geo-targetly-geo-redirect === )
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

geo-targetly-geo-redirect/geotargetly-geo-redirect.php 92% from 13 tests

"Geo Redirect" version 5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("geo-targetly-geo-redirect.php" instead of "geotargetly-geo-redirect.php")

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 plugin92 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1531092

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected