84% your-current-location-on-map

Code Review | Your Current Location On Map

WordPress plugin Your Current Location On Map scored84%from 54 tests.

About plugin

  • Plugin page: your-current-loca...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Nov 12, 2015
  • Latest release: Dec 8, 2016
  • Number of updates: 52
  • Update frequency: every 7.6 days
  • Top authors: pmbaldha (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /3,642 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.01MB] [CPU: ▼12.79ms] Passed 4 tests

This is a short check of server-side resources used by Your Current Location On Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.58 ▼2.80
Dashboard /wp-admin3.32 ▼0.0247.88 ▼15.41
Posts /wp-admin/edit.php3.37 ▲0.0246.01 ▼3.45
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.31 ▼29.51
Media Library /wp-admin/upload.php3.25 ▲0.0235.33 ▲2.63

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

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

Browser metrics Passed 4 tests

Your Current Location On Map: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.111.72 ▼0.0443.26 ▲0.21
Dashboard /wp-admin2,203 ▲155.79 ▲0.90101.21 ▼6.6039.40 ▼3.29
Posts /wp-admin/edit.php2,086 ▲182.00 ▼0.0139.36 ▲3.6134.47 ▲0.07
Add New Post /wp-admin/post-new.php1,542 ▲2318.28 ▼4.94659.65 ▲24.6657.02 ▲0.84
Media Library /wp-admin/upload.php1,385 ▼04.16 ▼0.01102.30 ▲0.3243.78 ▼0.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_clom_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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
Even though everything seems fine, this is not 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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/your-current-location-on-map/your-current-location-on-map.php:58

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: mobile-friendly, mapbox, leafletlive, current, lopcation...

your-current-location-on-map/your-current-location-on-map.php Passed 13 tests

The principal PHP file in "Your Current Location On Map" v. 1.1 is loaded by WordPress automatically on each request
136 characters long description:
Displays your current location in map with accuracy. Your Current Location On Map plugin is very easy to use,mobile friendly,responsive.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin6,990 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32,1795226,500
CSS24715419
PHP195171

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
leaflet/images/layers-2x.png2.83KB1.67KB▼ 41.10%
leaflet/images/layers.png1.47KB1.05KB▼ 28.36%
leaflet/images/marker-icon-2x.png3.94KB2.53KB▼ 35.71%
leaflet/images/marker-icon.png1.71KB1.56KB▼ 8.59%
leaflet/images/marker-shadow.png0.78KB1.16KB0.00%