84% location-click-map

Code Review | Location Click Map

WordPress plugin Location Click Map scored84%from 54 tests.

About plugin

  • Plugin page: location-click-map
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 11, 2016
  • Latest release: Jun 11, 2016
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: kiranpatil353 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,290 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.28ms] Passed 4 tests

An overview of server-side resources used by Location Click Map
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.30 ▼7.20
Dashboard /wp-admin3.38 ▲0.0751.97 ▼3.90
Posts /wp-admin/edit.php3.43 ▲0.0753.92 ▲0.18
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.19 ▼2.18
Media Library /wp-admin/upload.php3.30 ▲0.0744.27 ▲5.78
Locations Map /wp-admin/admin.php?page=map-locations3.2737.57
New Location /wp-admin/admin.php?page=addnew_location3.2733.82
Location Map Settings /wp-admin/options-general.php?page=LC_map_settings3.2736.66

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: 1 new table, 6 new options
New tables
wp_location_click_map_data
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Location Click Map
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8914.37 ▼0.2924.41 ▲22.5839.54 ▼3.46
Dashboard /wp-admin2,228 ▲485.62 ▲0.0894.43 ▲1.9240.66 ▼5.46
Posts /wp-admin/edit.php2,136 ▲361.97 ▼0.0642.46 ▲4.3534.84 ▼1.68
Add New Post /wp-admin/post-new.php1,553 ▲2523.03 ▼0.07691.96 ▲54.4755.78 ▼9.36
Media Library /wp-admin/upload.php1,433 ▲334.21 ▲0.00112.56 ▲6.1149.46 ▲3.61
Locations Map /wp-admin/admin.php?page=map-locations8511.9926.1327.13
New Location /wp-admin/admin.php?page=addnew_location8632.0326.5728.25
Location Map Settings /wp-admin/options-general.php?page=LC_map_settings8562.1626.5127.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/location-click-map/settings-page-locations.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/location-click-map/settings-page-locations.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: multiple location map, location click map, google maps marker, custom icon maps, maps marker...

location-click-map/index.php 92% from 13 tests

The primary PHP file in "Location Click Map" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("location-click-map.php" instead of "index.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
No dangerous file extensions were detected368 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP26130362
JavaScript1106

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected