84% easy-ip-redirection

Code Review | Easy IP Redirection

WordPress plugin Easy IP Redirection scored84%from 54 tests.

About plugin

  • Plugin page: easy-ip-redirection
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.3.2
  • WordPress version: 6.3.1
  • First release: Sep 1, 2016
  • Latest release: Feb 23, 2020
  • Number of updates: 14
  • Update frequency: every 90.7 days
  • Top authors: efficientninja (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,642 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.35ms] Passed 4 tests

Server-side resources used by Easy IP Redirection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.0341.70 ▼0.80
Dashboard /wp-admin3.60 ▲0.0351.20 ▼2.51
Posts /wp-admin/edit.php3.71 ▲0.0356.82 ▲5.92
Add New Post /wp-admin/post-new.php6.18 ▲0.0390.39 ▼24.01
Media Library /wp-admin/upload.php3.52 ▲0.0343.82 ▲6.16

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, 6 new options
New tables
wp_eip_rule
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Easy IP Redirection
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲6214.31 ▼0.071.86 ▼0.1634.46 ▼4.88
Dashboard /wp-admin2,214 ▲375.64 ▼0.0489.83 ▼1.1438.38 ▼6.69
Posts /wp-admin/edit.php2,119 ▲192.03 ▲0.0039.93 ▲4.1737.66 ▼2.86
Add New Post /wp-admin/post-new.php1,558 ▲2722.51 ▼0.68642.42 ▼18.7352.95 ▼3.34
Media Library /wp-admin/upload.php1,413 ▲134.26 ▲0.03103.29 ▼4.8242.45 ▼5.13

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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 | 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 items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/easy-ip-redirection/includes/functions.php:175
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/easy-ip-redirection/includes/options.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
9 plugin tags: 301 redirection plugin, woocommerce product redirection plugin, geo ip redirect, 404, location redirect...

easy-ip-redirection/easy-ip-redirection.php Passed 13 tests

The main PHP file in "Easy IP Redirection" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
101 characters long description:
Easy IP Redirection plugin redirect visitors from Website URL to specific URL based on their country.

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
Good job! No executable or dangerous file extensions detected605 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP47233605

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions10
▷ Named functions10100.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
No PNG files were detected