77% bws-google-maps

Code Review | Maps by BestWebSoft

WordPress plugin Maps by BestWebSoft scored77%from 54 tests.

About plugin

  • Plugin page: bws-google-maps
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Mar 20, 2014
  • Latest release: May 22, 2023
  • Number of updates: 48
  • Update frequency: every 69.8 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /17,665 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.88MB] [CPU: ▲7.64ms] Passed 4 tests

This is a short check of server-side resources used by Maps by BestWebSoft
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.9053.24 ▲10.97
Dashboard /wp-admin4.22 ▲0.9262.97 ▲8.44
Posts /wp-admin/edit.php4.27 ▲0.9261.03 ▲4.97
Add New Post /wp-admin/post-new.php6.76 ▲0.87104.72 ▲6.19
Media Library /wp-admin/upload.php4.08 ▲0.8549.90 ▲14.49
Add New /wp-admin/admin.php?page=gglmps_editor4.4744.12
Maps /wp-admin/admin.php?page=gglmps_manager4.0641.94
BWS Panel /wp-admin/admin.php?page=gglmps-bws-panel4.3846.58

Server storage [IO: ▲5.70MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/bws-google-maps/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 135 new files
Database: no new tables, 9 new options
New WordPress options
gglmps_maps
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
gglmps_options
bstwbsftwppdtplgns_options

Browser metrics Passed 4 tests

Checking browser requirements for Maps by BestWebSoft
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲16713.30 ▼1.241.86 ▼0.2141.47 ▼1.98
Dashboard /wp-admin2,330 ▲1275.92 ▲1.05100.88 ▼13.2137.81 ▼7.87
Posts /wp-admin/edit.php2,216 ▲1092.25 ▲0.2539.34 ▲3.9835.46 ▲1.06
Add New Post /wp-admin/post-new.php1,634 ▲8923.23 ▲0.01629.61 ▼74.1358.60 ▼1.63
Media Library /wp-admin/upload.php1,509 ▲1094.24 ▼0.0195.94 ▼16.0040.71 ▼4.43
Appearance /wp-admin/bws-google-maps-appearance.php260.440.1112.95
Settings /wp-admin/bws-google-maps.php260.440.076.55
Add New /wp-admin/admin.php?page=gglmps_editor1,5534.3992.1239.49
Maps /wp-admin/admin.php?page=gglmps_manager1,1171.8025.0227.67
BWS Panel /wp-admin/admin.php?page=gglmps-bws-panel3,1132.0135.7977.44

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bws-google-maps/bws-google-maps.php:981
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bws-google-maps/bws-google-maps.php on line 516
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bws-google-maps/bws_menu/class-bws-settings.php:1452
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bws-google-maps/bws_menu/product_list.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/bws-google-maps/includes/class-gglmps-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/bws-google-maps/includes/class-gglmps-add-new.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/bws-google-maps-appearance.php
    • > Network (severe)
    wp-admin/bws-google-maps-appearance.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/bws-google-maps.php
    • > Network (severe)
    wp-admin/bws-google-maps.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps_editor
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?libraries=places&language=en&ver=6.3.1 235:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/columns-bws/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/contact-form-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/contact-form-to-db/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/custom-admin-page/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/custom-search-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/captcha-bws/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/donate-button/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/error-log-viewer/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/facebook-button-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/gallery-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-google-2-step-verification/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-google-analytics/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/google-captcha/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/google-sitemap-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/google-shortlink/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/htaccess/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-google-maps/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/job-board/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/limit-attempts/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-linkedin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/pagination/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/multilanguage/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-pinterest/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/pdf-print/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/portfolio/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/post-to-csv/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/profile-extra-fields/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/promobar/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/rating-bws/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/realty/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/quotes-and-tips/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/slider-bws/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-smtp/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/social-buttons-pack/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/social-login-bws/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/relevant/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/subscriber/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-testimonials/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/timesheet/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/twitter-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/updater/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/user-role/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/sender/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=gglmps-bws-panel
    • > Network (severe)
    http://ps.w.org/visitors-online/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Map displaying in the front-end.), #2 (Plugin setting page.), #3 (Manager of saved maps.), #4 (Maps Editor.)
You can look at the official readme.txt

bws-google-maps/bws-google-maps.php Passed 13 tests

"Maps by BestWebSoft" version 1.4.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
65 characters long description:
Add customized Google maps to WordPress posts, pages and widgets.

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
Success! There were no dangerous files found in this plugin20,856 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PO File103,7225,6618,172
CSS111932765,872
PHP105226875,706
JavaScript1072141956
SVG400150

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity64.40
▷ Minimum class complexity7.00
▷ Maximum class complexity210.00
Average method complexity9.57
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods3183.78%
▷ Protected methods00.00%
▷ Private methods616.22%
Functions73
▷ Named functions73100.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
74 PNG files occupy 4.02MB with 1.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/style-0.png87.39KB81.98KB▼ 6.20%
screenshot-3.png87.21KB30.17KB▼ 65.40%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%