72% location-report

Code Review | Location Report

WordPress plugin Location Report scored72%from 54 tests.

About plugin

  • Plugin page: location-report
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.2
  • WordPress version: 6.3.1
  • First release: Apr 10, 2017
  • Latest release: Aug 6, 2020
  • Number of updates: 14
  • Update frequency: every 86.6 days
  • Top authors: christian_feldbauer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /761 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.67MB] [CPU: ▼3.49ms] Passed 4 tests

Analyzing server-side resources used by Location Report
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6738.40 ▼1.08
Dashboard /wp-admin3.98 ▲0.6852.70 ▲1.60
Posts /wp-admin/edit.php4.03 ▲0.6756.02 ▲3.12
Add New Post /wp-admin/post-new.php6.56 ▲0.6890.59 ▼14.92
Media Library /wp-admin/upload.php3.90 ▲0.6741.62 ▲0.43

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

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

Browser metrics Passed 4 tests

Location Report: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.58 ▼0.621.55 ▼0.6038.55 ▼4.85
Dashboard /wp-admin2,225 ▲224.84 ▼0.06114.09 ▲10.5643.07 ▲2.23
Posts /wp-admin/edit.php2,107 ▲102.02 ▲0.0041.27 ▲3.1836.59 ▼0.87
Add New Post /wp-admin/post-new.php1,555 ▲1023.43 ▲0.35657.03 ▲53.7952.97 ▼10.93
Media Library /wp-admin/upload.php1,401 ▲74.22 ▼0.0199.92 ▼0.9542.16 ▼6.29
LocationReport /wp-admin/locationreport.php260.440.1119.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/location-report/locationreport.php
    • > /wp-content/plugins/location-report/locationreport-options.php
  • 48× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'libKML\\Geometry' not found in wp-content/plugins/location-report/libKML/geometries/Polygon.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'libKML\\SubStyle' not found in wp-content/plugins/location-report/libKML/sub_styles/ListStyle.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'libKML\\KMLObject' not found in wp-content/plugins/location-report/libKML/geometries/Geometry.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'libKML\\KMLObject' not found in wp-content/plugins/location-report/libKML/sub_styles/SubStyle.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'libKML\\KMLObject' not found in wp-content/plugins/location-report/libKML/Icon.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'KMLObject.php' (include_path='.:/usr/share/php') in wp-content/plugins/location-report/libKML/geometries/Location.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'libKML\\KMLObject' not found in wp-content/plugins/location-report/libKML/style_selectors/StyleSelector.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'libKML\\KMLObject' not found in wp-content/plugins/location-report/libKML/geometries/ResourceMap.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'libKML\\Container' not found in wp-content/plugins/location-report/libKML/features/containers/Document.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'libKML\\ColorStyle' not found in wp-content/plugins/location-report/libKML/sub_styles/color_styles/LineStyle.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/locationreport.php
    • > Network (severe)
    wp-admin/locationreport.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: map, kml, latest position, shortcode, current location...

location-report/locationreport.php 77% from 13 tests

The entry point to "Location Report" version 1.1.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 771 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("location-report.php" instead of "locationreport.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
Everything looks great! No dangerous files found in this plugin4,006 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP631,3442663,907
PO File1163257
XML20442

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.97
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity1.49
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes60
▷ Abstract classes1016.67%
▷ Concrete classes5083.33%
▷ Final classes00.00%
Methods494
▷ Static methods10.20%
▷ Public methods494100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions62
▷ Named functions62100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/lilly/lilly32.png1.91KB1.65KB▼ 13.31%
templates/lilly/mm_20_purple.png0.57KB0.55KB▼ 2.76%
icon-128x128.png12.20KB5.26KB▼ 56.91%