83% wp-geo-search

Code Review | WP Geo search

WordPress plugin WP Geo search scored83%from 54 tests.

About plugin

  • Plugin page: wp-geo-search
  • Plugin version: 0.1
  • PHP compatiblity: 7+
  • PHP version: 7.4.16
  • WordPress compatibility: 4-5.8.0
  • WordPress version: 6.3.1
  • First release: Dec 13, 2020
  • Latest release: Sep 6, 2021
  • Number of updates: 5
  • Update frequency: every 53.2 days
  • Top authors: jhackett1 (100%)Otto42 (40%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /798 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼13.20ms] Passed 4 tests

Server-side resources used by WP Geo search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.70 ▼4.76
Dashboard /wp-admin3.32 ▼0.0344.37 ▼9.56
Posts /wp-admin/edit.php3.37 ▲0.0145.32 ▼2.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0176.61 ▼34.87
Media Library /wp-admin/upload.php3.24 ▲0.0132.85 ▼3.61

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

WP Geo search: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▲0.031.54 ▼0.3437.36 ▼3.28
Dashboard /wp-admin2,192 ▲185.64 ▲0.0096.42 ▲6.7642.09 ▲1.54
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0539.75 ▲0.1337.26 ▼2.00
Add New Post /wp-admin/post-new.php1,535 ▲618.27 ▼4.88607.42 ▼35.2668.03 ▲13.33
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.0395.68 ▼19.6439.35 ▼8.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-geo-search/inc/geocoder.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-geo-search/inc/search.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-geo-search/inc/geocoder.php:23

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: mapping, nominatim, haversine, distance, maps...

wp-geo-search/index.php 77% from 13 tests

The entry point to "WP Geo search" version 0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires at least: Periods and digits should be used for the required version number (ex. "7.0" instead of "4")
  • Requires PHP: Periods and digits should be used for the required version number (ex. "7.0" instead of "7")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-geo-search.php" instead of "index.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
No dangerous file extensions were detected112 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42511112

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin