89% wpengine-geoip

Code Review | WP Engine GeoTarget

WordPress plugin WP Engine GeoTarget scored89%from 54 tests.

About plugin

  • Plugin page: wpengine-geoip
  • Plugin version: 1.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Feb 27, 2015
  • Latest release: Aug 18, 2020
  • Number of updates: 23
  • Update frequency: every 86.9 days
  • Top authors: wpengine (86.96%)nateinaction (13.04%)Taylor4484 (8.7%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /63,035 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
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼17.42ms] Passed 4 tests

Analyzing server-side resources used by WP Engine GeoTarget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2341.38 ▼0.28
Dashboard /wp-admin3.28 ▼0.0227.51 ▼22.78
Posts /wp-admin/edit.php3.42 ▲0.0732.37 ▼12.66
Add New Post /wp-admin/post-new.php5.66 ▼0.2264.25 ▼26.24
Media Library /wp-admin/upload.php3.37 ▲0.1426.66 ▼8.01

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Engine GeoTarget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.63 ▼0.741.80 ▲0.0145.61 ▼1.04
Dashboard /wp-admin2,228 ▲374.81 ▼1.00111.12 ▲5.0245.30 ▲1.50
Posts /wp-admin/edit.php2,111 ▲222.01 ▲0.0140.62 ▼0.0936.57 ▲1.49
Add New Post /wp-admin/post-new.php1,545 ▲923.13 ▲0.09668.59 ▲72.5052.34 ▼5.15
Media Library /wp-admin/upload.php1,410 ▲194.22 ▲0.0297.39 ▼1.7642.13 ▼0.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: wpengine, wpe, localization, geolocation, geotarget...

wpengine-geoip/class-geoip.php 85% from 13 tests

The entry point to "WP Engine GeoTarget" version 1.2.8 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wpengine-geoip.php" instead of "class-geoip.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,353 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31293291,335
JavaScript151018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin