84% cf-geoplugin

Code Review | Geo Controller

WordPress plugin Geo Controller scored84%from 54 tests.

About plugin

  • Plugin page: cf-geoplugin
  • Plugin version: 8.6.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 21, 2015
  • Latest release: Nov 2, 2023
  • Number of updates: 428
  • Update frequency: every 6.7 days
  • Top authors: ivijanstefan (63.79%)creativform (36.45%)

Code review

54 tests

User reviews

25 reviews

Install metrics

1,000+ active /120,374 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲3.36MB] [CPU: ▲106.33ms] 75% from 4 tests

Server-side resources used by Geo Controller
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,406.67ms on /wp-admin/admin.php?page=cf-geoplugin-activate)
PageMemory (MB)CPU Time (ms)
Home /6.75 ▲3.2877.64 ▲35.80
Dashboard /wp-admin6.82 ▲3.51619.61 ▲570.68
Posts /wp-admin/edit.php6.73 ▲3.3791.19 ▲41.93
Add New Post /wp-admin/post-new.php9.34 ▲3.45396.17 ▲307.17
Media Library /wp-admin/upload.php6.55 ▲3.3277.17 ▲40.40
Site Protection /wp-admin/admin.php?page=cf-geoplugin-defender6.6771.97
Settings /wp-admin/admin.php?page=cf-geoplugin-settings6.8671.04
Activate Unlimited /wp-admin/admin.php?page=cf-geoplugin-activate6.691,406.67
Geo Controller /wp-admin/admin.php?page=cf-geoplugin6.6765.08
Debug Mode /wp-admin/admin.php?page=cf-geoplugin-debug6.7663.97

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 467 new files
Database: 3 new tables, 9 new options
New tables
wp_cfgp_seo_redirection
wp_cfgp_rest_access_token
wp_cfgp_cache
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_cfgp_widget_currency_converter
theysaidso_admin_options
widget_theysaidso_widget
cf-geoplugin-ID
cf-geoplugin-activation
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Geo Controller
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,358 ▲57214.37 ▲0.112.58 ▲0.5333.48 ▼13.79
Dashboard /wp-admin2,688 ▲5115.82 ▲0.3188.07 ▼3.4288.16 ▲49.64
Posts /wp-admin/edit.php2,284 ▲1842.29 ▲0.2742.86 ▲6.3042.79 ▲7.98
Add New Post /wp-admin/post-new.php3,249 ▲1,71418.80 ▲0.61673.30 ▲57.5485.38 ▲17.08
Media Library /wp-admin/upload.php1,571 ▲1744.30 ▲0.15105.43 ▲1.1546.87 ▲2.93
Site Protection /wp-admin/admin.php?page=cf-geoplugin-defender3,4317.67178.6193.25
Settings /wp-admin/admin.php?page=cf-geoplugin-settings3,9372.4341.8475.14
Activate Unlimited /wp-admin/admin.php?page=cf-geoplugin-activate1,2521.9432.7449.66
Geo Controller /wp-admin/admin.php?page=cf-geoplugin3,8011.9134.0046.82
Debug Mode /wp-admin/admin.php?page=cf-geoplugin-debug2,3331.9235.1045.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_cfgp_widget_currency_converter
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 72× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/cf-geoplugin/inc/classes/SEO_Redirection.php
    • > /wp-content/plugins/cf-geoplugin/inc/filters/seo_redirection_import.php
    • > /wp-content/plugins/cf-geoplugin/inc/classes/SEO.php
    • > /wp-content/plugins/cf-geoplugin/inc/classes/Debug.php
    • > /wp-content/plugins/cf-geoplugin/inc/filters/seo_redirection_table.php
    • > /wp-content/plugins/cf-geoplugin/inc/classes/CF_Geoplugin.php
    • > /wp-content/plugins/cf-geoplugin/inc/classes/Utilities.php
    • > /wp-content/plugins/cf-geoplugin/inc/settings/license.php
    • > /wp-content/plugins/cf-geoplugin/inc/classes/Taxonomy.php
    • > /wp-content/plugins/cf-geoplugin/inc/filters/main_page.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
9 plugin tags: tor, tor detection, user location detection, seo optimization, spam protection...

cf-geoplugin/cf-geoplugin.php Passed 13 tests

"Geo Controller" version 8.6.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
123 characters long description:
Unlock the power of location-based functionality of WordPress – The ultimate all-in-one geolocation plugin for WordPress.

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
Everything looks great! No dangerous files found in this plugin74,809 lines of code in 422 files:
LanguageFilesBlank linesComment linesLines of code
SVG321157,2065248,312
PHP752,9433,99721,704
PO File19441,1452,354
JavaScript111901251,427
CSS13168151,011
JSON1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity51.87
▷ Minimum class complexity1.00
▷ Maximum class complexity365.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes55
▷ Abstract classes00.00%
▷ Concrete classes55100.00%
▷ Final classes11.82%
Methods627
▷ Static methods23337.16%
▷ Public methods52683.89%
▷ Protected methods538.45%
▷ Private methods487.66%
Functions67
▷ Named functions00.00%
▷ Anonymous functions67100.00%
Constants129
▷ Global constants4635.66%
▷ Class constants8364.34%
▷ Public constants83100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/developed-by.png14.55KB5.35KB▼ 63.21%