83% geo-targetly-geo-redirect

Code Review | Geo Redirect

WordPress plugin Geo Redirect scored83%from 54 tests.

About plugin

  • Plugin page: geo-targetly-geo-...
  • Plugin version: 7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Mar 20, 2018
  • Latest release: Nov 6, 2023
  • Number of updates: 24
  • Update frequency: every 85.8 days
  • Top authors: geotargetly (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /13,640 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.14MB] [CPU: ▼4.46ms] Passed 4 tests

This is a short check of server-side resources used by Geo Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.6119.71 ▼14.90
Dashboard /wp-admin3.32 ▲0.0244.95 ▲3.64
Posts /wp-admin/edit.php3.38 ▲0.0249.92 ▲5.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.72 ▼9.34
Media Library /wp-admin/upload.php3.25 ▲0.0237.24 ▲2.76

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Geo Redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲5914.31 ▼0.031.80 ▲0.2145.12 ▲3.48
Dashboard /wp-admin2,211 ▲335.56 ▼0.1488.61 ▼25.7236.36 ▼9.76
Posts /wp-admin/edit.php2,119 ▲191.96 ▼0.0538.65 ▲3.3436.47 ▲5.61
Add New Post /wp-admin/post-new.php1,539 ▲1323.24 ▲0.02686.32 ▲75.8752.75 ▼8.41
Media Library /wp-admin/upload.php1,413 ▲134.20 ▼0.1098.63 ▼6.7739.94 ▼1.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === geo-targetly-geo-redirect === )
The official readme.txt might help

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

"Geo Redirect" version 7.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and 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 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected92 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1531092

PHP code Passed 2 tests

An overview 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 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin