72% location-piker

Code Review | Google Map With Fancybox

WordPress plugin Google Map With Fancybox scored72%from 54 tests.

About plugin

  • Plugin page: location-piker
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.1
  • WordPress version: 6.3.1
  • First release: Mar 22, 2017
  • Latest release: Dec 10, 2017
  • Number of updates: 21
  • Update frequency: every 12.4 days
  • Top authors: mondal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /532 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼6.59ms] Passed 4 tests

An overview of server-side resources used by Google Map With Fancybox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1537.01 ▼3.79
Dashboard /wp-admin3.46 ▲0.1246.08 ▼14.64
Posts /wp-admin/edit.php3.58 ▲0.2246.52 ▲3.02
Add New Post /wp-admin/post-new.php6.06 ▲0.1894.41 ▼8.77
Media Library /wp-admin/upload.php3.39 ▲0.1633.76 ▲0.86
Gallery /wp-admin/admin.php?page=location_piker_gallery3.3530.52
Location Piker /wp-admin/admin.php?page=location3.3332.76
Settings /wp-admin/admin.php?page=location_piker_setting3.3530.79

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google Map With Fancybox
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲18413.96 ▼0.469.86 ▲8.0738.28 ▼5.17
Dashboard /wp-admin2,244 ▲565.80 ▼0.03102.90 ▼12.0338.28 ▼7.74
Posts /wp-admin/edit.php2,130 ▲412.04 ▼0.0140.27 ▲2.7035.82 ▼1.67
Add New Post /wp-admin/post-new.php1,549 ▲2123.14 ▲4.98651.74 ▲21.7959.66 ▲5.76
Media Library /wp-admin/upload.php1,426 ▲414.37 ▲0.17101.19 ▼5.7543.06 ▼0.29
Gallery /wp-admin/admin.php?page=location_piker_gallery8171.7228.3826.79
Location Piker /wp-admin/admin.php?page=location6971.557.0921.57
Settings /wp-admin/admin.php?page=location_piker_setting8051.7123.9925.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/location-piker/admin/partials/location-piker-admin-display.php
    • > /wp-content/plugins/location-piker/public/partials/location-piker-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/location-piker/admin/templates/location-piker-setting.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=location_piker_setting
    • > Javascript (severe) in unknown
    /wp-content/plugins/location-piker/admin/js/lokation-piker-bootstrap.min.js?ver=1.0.0 1:215 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: map, google map with fancybox popup, google map, google map with fancybox, location piker...

location-piker/location-piker.php Passed 13 tests

"Google Map With Fancybox" version 2.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
135 characters long description:
Location Piker plugin is awesome google map maker , easy to use for google map that’s able to display google map with fancybox popup.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected11,929 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
CSS6133157,501
JavaScript71,7203883,708
PHP13228403719
HTML1001

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 114)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity21.29
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity4.16
▷ Minimum method complexity1.00
▷ Maximum method complexity114.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods45
▷ Static methods24.44%
▷ Public methods3884.44%
▷ Protected methods24.44%
▷ Private methods511.11%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/inc/fancybox-x.png0.20KB0.31KB0.00%
public/inc/fancy_loading.png9.96KB6.30KB▼ 36.67%
public/inc/fancybox-y.png0.17KB0.24KB0.00%
public/inc/fancybox.png14.93KB8.47KB▼ 43.29%