94% inlocation

Code Review | InLocation

WordPress plugin InLocation scored 94% from 54 tests.

About plugin

  • Plugin page: inlocation
  • Plugin version: 1.8
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2.2
  • WordPress version: 5.8.1
  • First release: May 12, 2016
  • Latest release: Aug 18, 2019
  • Number of updates: 13
  • Update frequency: every 91.8 days
  • Top authors: gabrieldarezzo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active / 14,658 total downloads

Benchmarks

Plugin footprint Passed 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.09MB] [CPU: ▼141.43ms] Passed 4 tests

An overview of server-side resources used by InLocation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1842.45 ▲17.89
Dashboard /wp-admin3.14 ▲0.0860.86 ▲14.37
Posts /wp-admin/edit.php3.22 ▲0.1248.35 ▼0.15
Add New Post /wp-admin/post-new.php5.49 ▲0.06100.44 ▼579.43
Media Library /wp-admin/upload.php3.08 ▲0.0835.63 ▼0.49

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 718 new files
Database: 1 new table, no new options
New tables
wp_il_local

Browser metrics Passed 4 tests

An overview of browser requirements for InLocation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,729 ▲13315.98 ▲0.4513.91 ▲3.8252.31 ▼7.01
Dashboard /wp-admin2,993 ▲626.04 ▲0.05145.12 ▼18.12119.73 ▼3.06
Posts /wp-admin/edit.php2,771 ▲322.76 ▲0.0579.23 ▲8.55102.61 ▲9.04
Add New Post /wp-admin/post-new.php1,639 ▲2421.90 ▲0.79287.91 ▼11.16117.78 ▲1.60
Media Library /wp-admin/upload.php1,833 ▲265.05 ▲0.03168.28 ▲4.64130.39 ▲4.78

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/inlocation/inlocation.php

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please a description for screenshot #4 in inlocation/assets to your readme.txt
Please take inspiration from this readme.txt

inlocation/inlocation.php Passed 13 tests

The main file in "InLocation" v. 1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
76 characters long description:
Plugin para criar um Mapa (via GoogleMaps) com seu endereço fisico por CEPs

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 plugin1,231 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript610334681
PHP212736339
PO File25252138
CSS211273

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
699 PNG files occupy 0.77MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon/shower.png1.33KB1.00KB▼ 25.15%
images/icon/daycare.png1.68KB1.02KB▼ 39.10%
images/icon/campfire-2.png0.94KB0.59KB▼ 37.27%
images/icon/bank.png1.07KB0.74KB▼ 31.04%
images/icon/snowy-2.png1.75KB1.07KB▼ 38.94%