83% bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery

Code Review | BS Maps - Google Map and Leaflet Map for Elementor and WPBackery

WordPress plugin BS Maps - Google Map and Leaflet Map for Elementor and WPBackery scored83%from 54 tests.

About plugin

  • Plugin page: bs-maps-google-ma...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Jan 6, 2023
  • Latest release: Apr 30, 2023
  • Number of updates: 42
  • Update frequency: every 2.7 days
  • Top authors: balcomsoft100 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /802 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▲471.20ms] 75% from 4 tests

An overview of server-side resources used by BS Maps - Google Map and Leaflet Map for Elementor and WPBackery
Please have a look at the following items
  • Extra CPU: Extra CPU usage must be kept under 200.00ms (currently 471.20ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0628.50 ▼17.51
Dashboard /wp-admin3.47 ▲0.161,867.98 ▲1,815.69
Posts /wp-admin/edit.php3.50 ▲0.15734.04 ▲686.04
Add New Post /wp-admin/post-new.php5.98 ▲0.10688.53 ▲600.54
Media Library /wp-admin/upload.php3.33 ▲0.10650.19 ▲615.71

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for BS Maps - Google Map and Leaflet Map for Elementor and WPBackery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,980 ▲20913.71 ▼0.508.49 ▲5.8836.96 ▼8.71
Dashboard /wp-admin2,280 ▲895.89 ▲0.0097.92 ▼15.9882.67 ▲39.06
Posts /wp-admin/edit.php2,124 ▲352.05 ▲0.0336.99 ▼0.7139.51 ▲2.99
Add New Post /wp-admin/post-new.php1,535 ▲217.60 ▼5.82661.17 ▼18.0252.39 ▼10.04
Media Library /wp-admin/upload.php1,423 ▲354.22 ▲0.0295.01 ▼13.7243.96 ▼2.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery/includes/elementor/class-bsmaps-elementor-widgets.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_atts() in wp-content/plugins/bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery/includes/shortcodes/output/bsmaps-vc-gmap.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery/includes/helpers.php:256
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_atts() in wp-content/plugins/bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery/includes/shortcodes/output/bsmaps-vc-lmap.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery/includes/ad-banner.php:40
    • > PHP Fatal error
      require_once(): Failed opening required 'BSMAPS_PATH/includes/helpers.php' (include_path='.:/usr/share/php') in wp-content/plugins/bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery/includes/class-bsmaps-loader.php on line 57
    • > PHP Warning
      Use of undefined constant BSMAPS_PATH - assumed 'BSMAPS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery/includes/class-bsmaps-loader.php on line 57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery/includes/settings.php:44
    • > PHP Warning
      require_once(BSMAPS_PATH/includes/helpers.php): failed to open stream: No such file or directory in wp-content/plugins/bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery/includes/class-bsmaps-loader.php on line 57

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery/bsmaps.php 77% from 13 tests

The primary PHP file in "BS Maps - Google Map and Leaflet Map for Elementor and WPBackery" version 1.2.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bs-maps-google-map-and-leaflet-map-for-elementor-and-wpbakery.php" instead of "bsmaps.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 81 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin11,740 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript459208,998
PHP141656271,232
Sass11450757
CSS21541753

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity3.88
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods46
▷ Static methods12.17%
▷ Public methods3882.61%
▷ Protected methods613.04%
▷ Private methods24.35%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
PNG images were not found in this plugin