74% local-geo-search

Code Review | Local Geo Search

WordPress plugin Local Geo Search scored74%from 54 tests.

About plugin

  • Plugin page: local-geo-search
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 4, 2015
  • Latest release: Nov 10, 2023
  • Number of updates: 49
  • Update frequency: every 62.3 days
  • Top authors: andrewsauder (77.55%)jdmoraflama (24.49%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,592 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.09MB] [CPU: ▼39.34ms] Passed 4 tests

Analyzing server-side resources used by Local Geo Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.88 ▼0.5817.82 ▼21.68
Dashboard /wp-admin2.93 ▼0.3816.62 ▼34.42
Posts /wp-admin/edit.php2.93 ▼0.4318.02 ▼30.63
Add New Post /wp-admin/post-new.php2.93 ▼2.9620.76 ▼70.64
Media Library /wp-admin/upload.php2.93 ▼0.3017.13 ▼19.18

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Local Geo Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲1514.32 ▼0.031.74 ▼0.3342.80 ▼2.42
Dashboard /wp-admin2,210 ▲335.64 ▼0.0389.47 ▼10.3940.24 ▼3.24
Posts /wp-admin/edit.php2,112 ▲92.03 ▲0.0240.34 ▲3.4844.60 ▲13.08
Add New Post /wp-admin/post-new.php1,535 ▲921.97 ▼1.29679.79 ▲9.1553.80 ▼11.61
Media Library /wp-admin/upload.php1,409 ▲64.20 ▲0.0699.27 ▼4.6542.46 ▲2.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/local-geo-search/classes/fns.tools.php+17
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/local-geo-search/admin/views/view.admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/local-geo-search/admin/admin.geoseo.php:381
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/local-geo-search/admin/admin.geoseo.php:381

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes: You can look at the official readme.txt

local-geo-search/geoseo.php 92% from 13 tests

Analyzing the main PHP file in "Local Geo Search" version 2.0.3
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("local-geo-search.php" instead of "geoseo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,014 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9332305981
CSS14021
JavaScript10112

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity22.25
▷ Minimum class complexity13.00
▷ Maximum class complexity27.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods41
▷ Static methods1434.15%
▷ Public methods3995.12%
▷ Protected methods00.00%
▷ Private methods24.88%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
front/images/icon.png0.41KB0.47KB0.00%