79% redirect-geo-ip

Code Review | Redirect via Geo IP WooCommerce

WordPress plugin Redirect via Geo IP WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: redirect-geo-ip
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2021
  • Latest release: Apr 25, 2023
  • Number of updates: 8
  • Update frequency: every 94.9 days
  • Top authors: sunarc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /700 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
Installer ran successfully

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

This is a short check of server-side resources used by Redirect via Geo IP WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.58 ▼0.02
Dashboard /wp-admin3.33 ▲0.0352.15 ▼2.20
Posts /wp-admin/edit.php3.38 ▲0.0353.64 ▼5.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0395.07 ▲2.18
Media Library /wp-admin/upload.php3.26 ▲0.0335.85 ▼3.08
Redirect via Geo IP /wp-admin/options-general.php?page=redirect-geo-ip3.2033.18

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Redirect via Geo IP WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.15 ▼0.481.79 ▼0.0342.08 ▼2.51
Dashboard /wp-admin2,196 ▲195.57 ▼0.0188.42 ▼13.9741.20 ▼1.03
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0242.08 ▲2.8036.97 ▼5.08
Add New Post /wp-admin/post-new.php1,529 ▲323.51 ▼0.07640.83 ▲18.4457.28 ▼1.34
Media Library /wp-admin/upload.php1,398 ▼24.28 ▲0.0699.09 ▼3.6547.38 ▲4.54
Redirect via Geo IP /wp-admin/options-general.php?page=redirect-geo-ip2,1072.0125.9928.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=redirect-geo-ip
    • > Notice in wp-content/plugins/redirect-geo-ip/redirect-geo-ip.php+103
    Trying to access array offset on value of type bool

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/redirect-geo-ip/INC/country_tbl.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/redirect-geo-ip/INC/country_tbl.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/redirect-geo-ip/INC/country_tbl.php on line 3

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: woocommerce

redirect-geo-ip/redirect-geo-ip.php Passed 13 tests

"Redirect via Geo IP WooCommerce" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
110 characters long description:
Redirect via Geo IP plugin automatically determines visitors locations and redirects them to the correct store

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected377 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24134377

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Constants2
▷ Global constants2100.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 were not PNG files found in your plugin