62% geo-redirects

Code Review | Geo Redirects Lite

WordPress plugin Geo Redirects Lite scored62%from 54 tests.

About plugin

  • Plugin page: geo-redirects
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 19, 2017
  • Latest release: Jun 19, 2017
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: timersys (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /3,083 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.66MB] [CPU: ▲2.09ms] Passed 4 tests

An overview of server-side resources used by Geo Redirects Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.8450.54 ▲11.19
Dashboard /wp-admin3.96 ▲0.6659.13 ▲4.45
Posts /wp-admin/edit.php4.01 ▲0.6651.56 ▲3.74
Add New Post /wp-admin/post-new.php6.54 ▲0.66101.49 ▼2.79
Media Library /wp-admin/upload.php3.89 ▲0.6643.02 ▲2.94
Settings /wp-admin/admin.php?page=geot-settings3.9337.43
Geo Redirects /wp-admin/edit.php?post_type=geotr_cpt3.9346.25
Debug data /wp-admin/admin.php?page=geot-debug-data4.0336.07

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 222 new files
Database: 1 new table, 6 new options
New tables
wp_geot_countries
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Geo Redirects Lite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲6613.55 ▼1.201.69 ▼0.2840.91 ▼0.86
Dashboard /wp-admin2,240 ▲495.00 ▼0.90107.38 ▲0.0541.73 ▼4.69
Posts /wp-admin/edit.php2,126 ▲372.01 ▼0.0437.51 ▼2.6932.79 ▼4.56
Add New Post /wp-admin/post-new.php1,561 ▲4223.21 ▼0.03658.45 ▼32.9366.48 ▼1.61
Media Library /wp-admin/upload.php1,422 ▲314.41 ▲0.2996.00 ▼12.7845.39 ▼1.61
Settings /wp-admin/admin.php?page=geot-settings3,4622.0224.9029.68
Geo Redirects /wp-admin/edit.php?post_type=geotr_cpt1,0901.9835.7129.13
Debug data /wp-admin/admin.php?page=geot-debug-data8202.0325.0226.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_geot_countries
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=geot-debug-data
    • > Notice in wp-content/plugins/geo-redirects/vendor/timersys/geot-functions/src/GeotFunctions.php+309
    Undefined variable: record

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/geo-redirects/vendor/mobiledetect/mobiledetectlib/export/exportToJSON.php
  • 64× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/geo-redirects/vendor/guzzlehttp/psr7/src/ServerRequest.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/geo-redirects/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'GeotWP\\Record\\AbstractRecord' not found in wp-content/plugins/geo-redirects/vendor/timersys/geotargetingwp/src/Record/City.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GeotWP\\Exception\\GeotException' not found in wp-content/plugins/geo-redirects/vendor/timersys/geotargetingwp/src/Exception/OutofCreditsException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/geo-redirects/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/geo-redirects/vendor/guzzlehttp/psr7/src/BufferStream.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Exception\\ExceptionInterface' not found in wp-content/plugins/geo-redirects/vendor/vlucas/phpdotenv/src/Exception/InvalidFileException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Jaybizzle\\CrawlerDetect\\Fixtures\\AbstractProvider' not found in wp-content/plugins/geo-redirects/vendor/jaybizzle/crawler-detect/src/Fixtures/Headers.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'GeotWP\\Record\\AbstractRecord' not found in wp-content/plugins/geo-redirects/vendor/timersys/geotargetingwp/src/Record/Continent.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GeotWP\\Record\\AbstractRecord' not found in wp-content/plugins/geo-redirects/vendor/timersys/geotargetingwp/src/Record/Country.php:5

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: geotargeting, geolite, geo redirects, redirect by country, maxmind...

geo-redirects/geotr.php 85% from 13 tests

Analyzing the main PHP file in "Geo Redirects Lite" version 1.0.0
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("geo-redirects.php" instead of "geotr.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin18,320 lines of code in 195 files:
LanguageFilesBlank linesComment linesLines of code
PHP1562,7427,22212,865
Markdown151,10903,538
JSON1300898
C17315477
CSS23116231
JavaScript28360170
XML2457876
YAML17034
m415014
make1409
C/C++ Header14128

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity12.83
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces22
Interfaces15
Traits2
Classes110
▷ Abstract classes21.82%
▷ Concrete classes10898.18%
▷ Final classes76.48%
Methods846
▷ Static methods12314.54%
▷ Public methods67880.14%
▷ Protected methods192.25%
▷ Private methods14917.61%
Functions193
▷ Named functions9649.74%
▷ Anonymous functions9750.26%
Constants61
▷ Global constants711.48%
▷ Class constants5488.52%
▷ Public constants54100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin