73% pin-locations-on-map

Code Review | Pin Locations on Map

WordPress plugin Pin Locations on Map scored73%from 54 tests.

About plugin

  • Plugin page: pin-locations-on-map
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2015
  • Latest release: Jul 17, 2015
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: arsh91 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /756 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.05ms] Passed 4 tests

Analyzing server-side resources used by Pin Locations on Map
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.61 ▲3.81
Dashboard /wp-admin3.32 ▼0.0344.42 ▼15.26
Posts /wp-admin/edit.php3.37 ▲0.0144.88 ▼0.96
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.74 ▼11.91
Media Library /wp-admin/upload.php3.24 ▲0.0134.72 ▼0.06

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 16 new files
Database: 1 new table, 6 new options
New tables
wp_plom_map
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pin Locations on Map
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.29 ▼0.071.71 ▲0.0648.45 ▲6.73
Dashboard /wp-admin2,209 ▲295.56 ▼0.0785.24 ▼0.0136.12 ▼3.11
Posts /wp-admin/edit.php2,137 ▲372.22 ▲0.2241.46 ▲4.9336.68 ▲3.22
Add New Post /wp-admin/post-new.php1,554 ▲2818.12 ▼5.16620.39 ▼85.5961.25 ▼7.98
Media Library /wp-admin/upload.php1,427 ▲304.24 ▲0.0698.67 ▼35.5844.35 ▼8.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_plom_map
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pin-locations-on-map/plom_map.php:49

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention: The official readme.txt might help

pin-locations-on-map/plom_map.php 85% from 13 tests

"Pin Locations on Map" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 144 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("pin-locations-on-map.php" instead of "plom_map.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin824 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2378312
PHP14418272
CSS120240

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.33
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%
Functions12
▷ Named functions12100.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
8 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pin_old.png1.92KB1.31KB▼ 31.99%
images/arrow.png1.26KB0.40KB▼ 68.01%
images/delete.png0.74KB0.92KB0.00%
images/pin.png1.58KB0.82KB▼ 47.74%
images/bottom_bg.png1.61KB0.78KB▼ 51.79%