83% location-picker

Code Review | Location Picker

WordPress plugin Location Picker scored83%from 54 tests.

About plugin

  • Plugin page: location-picker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.4
  • WordPress version: 6.3.1
  • First release: Dec 28, 2015
  • Latest release: Jan 1, 2016
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: pluginscart (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /2,960 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Location Picker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.17 ▼2.90
Dashboard /wp-admin3.31 ▲0.0144.73 ▼2.13
Posts /wp-admin/edit.php3.36 ▲0.0145.67 ▼1.94
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.67 ▼19.91
Media Library /wp-admin/upload.php3.23 ▲0.0030.58 ▼4.10

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Location Picker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14215.55 ▲1.2046.56 ▲44.8340.48 ▲2.66
Dashboard /wp-admin2,192 ▲155.61 ▲0.0592.19 ▲2.4541.79 ▲2.39
Posts /wp-admin/edit.php2,103 ▲31.98 ▲0.0339.58 ▼2.3335.24 ▼0.92
Add New Post /wp-admin/post-new.php1,535 ▲718.42 ▼4.53589.71 ▼63.3767.74 ▲15.41
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.0095.44 ▼17.6440.47 ▼8.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/location-picker/location-picker.php:18

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 83% 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
These attributes need your attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can look at the official readme.txt

location-picker/location-picker.php 69% from 13 tests

The principal PHP file in "Location Picker" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Description: Keep the plugin description shorter than 140 characters (currently 232 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected431 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP117358340
JavaScript119491

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
5 PNG files occupy 0.40MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
logo.png10.78KB5.51KB▼ 48.85%
screenshot-2.png51.09KB24.23KB▼ 52.57%
screenshot-3.png135.99KB52.75KB▼ 61.21%
screenshot-1.png67.00KB31.52KB▼ 52.95%
screenshot-4.png140.72KB54.07KB▼ 61.58%