90% easy-redirect-by-ip

Code Review | Easy Bouncer - Redirect by IP

WordPress plugin Easy Bouncer - Redirect by IP scored90%from 54 tests.

About plugin

  • Plugin page: easy-redirect-by-ip
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2014
  • Latest release: Dec 17, 2014
  • Number of updates: 9
  • Update frequency: every 71.3 days
  • Top authors: Greenweb (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,904 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Easy Bouncer - Redirect by IP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.11 ▼7.44
Dashboard /wp-admin3.37 ▲0.0645.16 ▼2.92
Posts /wp-admin/edit.php3.48 ▲0.1246.10 ▼5.64
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.83 ▼1.29
Media Library /wp-admin/upload.php3.29 ▲0.0633.98 ▲1.14
Redirect by IP /wp-admin/options-general.php?page=eri-options-page3.2631.42

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
eri_safe_ips
widget_theysaidso_widget
eri_pass_key
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Easy Bouncer - Redirect by IP: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7914.80 ▲0.431.67 ▼0.5338.95 ▼6.59
Dashboard /wp-admin2,220 ▲294.85 ▼1.03105.97 ▼9.8340.66 ▼3.77
Posts /wp-admin/edit.php2,102 ▲101.96 ▼0.0942.46 ▲1.2638.35 ▲3.17
Add New Post /wp-admin/post-new.php1,555 ▲3323.17 ▼0.05604.29 ▼40.4368.45 ▲2.45
Media Library /wp-admin/upload.php1,402 ▲144.23 ▼0.0098.46 ▲3.7943.28 ▲3.43
Redirect by IP /wp-admin/options-general.php?page=eri-options-page9101.7828.4350.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: redirect, redirection by ip address, beforesite, private website, site redirection...

easy-redirect-by-ip/easy-redirect-by-ip.php 92% from 13 tests

The primary PHP file in "Easy Bouncer - Redirect by IP" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 215 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected277 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23342264
JavaScript22511
CSS1002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity13.00
▷ Minimum class complexity8.00
▷ Maximum class complexity18.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.67KB1.01KB▼ 39.73%
images/gvw-clouds-2.png3.44KB2.60KB▼ 24.59%
images/gvw-clouds-01.png3.64KB2.78KB▼ 23.64%
images/erip-icon-32by32.png1.47KB1.03KB▼ 29.65%