10% lsd-google-maps-embedder

Code Review | LSD Google Maps Embedder

WordPress plugin LSD Google Maps Embedder scored10%from 54 tests.

About plugin

  • Plugin page: lsd-google-maps-e...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 25, 2014
  • Latest release: Aug 25, 2014
  • Number of updates: 19
  • Update frequency: every 1.6 days
  • Top authors: BasMatthee (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /2,136 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/lsd-google-maps-embedder/views/shortcode.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; lsd_gme_shortcode has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼51.26ms] Passed 4 tests

An overview of server-side resources used by LSD Google Maps Embedder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.26 ▼34.75
Dashboard /wp-admin2.10 ▼1.216.41 ▼46.14
Posts /wp-admin/edit.php2.10 ▼1.266.52 ▼42.42
Add New Post /wp-admin/post-new.php2.10 ▼3.796.25 ▼81.73
Media Library /wp-admin/upload.php2.10 ▼1.136.63 ▼29.91
Google Maps /wp-admin/options-general.php?page=google_maps_embedder2.106.50

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for LSD Google Maps Embedder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4613.31 ▼1.241.90 ▼0.1640.23 ▼3.81
Dashboard /wp-admin2,216 ▲395.87 ▲0.3490.06 ▼9.8936.82 ▼7.45
Posts /wp-admin/edit.php2,123 ▲232.31 ▲0.2740.52 ▲5.0734.49 ▲2.54
Add New Post /wp-admin/post-new.php1,543 ▲1723.71 ▲0.19664.69 ▼47.6236.69 ▼17.13
Media Library /wp-admin/upload.php1,418 ▲184.49 ▲0.31105.28 ▲1.0046.21 ▲0.61
Google Maps /wp-admin/options-general.php?page=google_maps_embedder8702.0828.8329.86

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
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/lsd-google-maps-embedder/views/shortcode.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; lsd_gme_shortcode has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=google_maps_embedder
    • > Deprecated in wp-content/plugins/lsd-google-maps-embedder/views/shortcode.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; lsd_gme_shortcode has a deprecated constructor

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/lsd-google-maps-embedder/lsd-google-maps.embedder.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lsd-google-maps-embedder/views/shortcode.php:8
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/lsd-google-maps-embedder/lsd-google-maps.embedder.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (WYSIWYG Editor popup window in Wordpress admin), #2 (This is how Places mode looks like), #3 (This is how Directions mode looks like), #4 (This is how Search mode looks like), #5 (This is how View mode looks like)
The official readme.txt is a good inspiration

lsd-google-maps-embedder/lsd-google-maps.embedder.php 92% from 13 tests

The entry point to "LSD Google Maps Embedder" version 1.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lsd-google-maps-embedder.php" instead of "lsd-google-maps.embedder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin367 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP48620143
HTML1134124
JavaScript21921100

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.00
▷ Minimum class complexity4.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.94MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/lsd-gme.png1.29KB1.36KB0.00%
screenshot-2.png70.25KB28.84KB▼ 58.95%
screenshot-4.png224.61KB92.27KB▼ 58.92%
screenshot-1.png14.60KB7.73KB▼ 47.02%
screenshot-3.png291.85KB116.55KB▼ 60.06%