77% api-bing-map-2018

Code Review | WP Bing Map Pro

WordPress plugin WP Bing Map Pro scored77%from 54 tests.

About plugin

  • Plugin page: api-bing-map-2018
  • Plugin version: 5.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-6.3
  • WordPress version: 6.3.1
  • First release: May 30, 2018
  • Latest release: Sep 22, 2023
  • Number of updates: 163
  • Update frequency: every 11.9 days
  • Top authors: dan009 (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active /24,647 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.07MB] [CPU: ▲6.77ms] Passed 4 tests

An overview of server-side resources used by WP Bing Map Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.55 ▲1.0851.47 ▲11.98
Dashboard /wp-admin4.38 ▲1.0755.47 ▲8.52
Posts /wp-admin/edit.php4.43 ▲1.0756.73 ▲10.44
Add New Post /wp-admin/post-new.php6.96 ▲1.07107.69 ▼2.41
Media Library /wp-admin/upload.php4.30 ▲1.0746.93 ▲10.54
WP Bing Map Pro /wp-admin/admin.php?page=BingMapPro_Plugin_Maps4.2345.23
Shapes /wp-admin/admin.php?page=BingMapPro_Plugin_Shapes4.4445.01
Permissions /wp-admin/admin.php?page=BingMapPro_Plugin_Permissions4.2343.29
Pins /wp-admin/admin.php?page=BingMapPro_Plugin_Pins4.4449.71
Settings /wp-admin/admin.php?page=BingMapPro_Plugin_Settings4.2349.65

Server storage [IO: ▲5.62MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 852 new files
Database: 6 new tables, 8 new options
New tables
wp_bingmappro_map_shapes
wp_bingmappro_pins
wp_bingmappro_map_shortcodes
wp_bingmappro_shapes
wp_bingmappro_map_pins
wp_bingmappro_maps
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
BingMapPro__installed
widget_recent-posts
widget_theysaidso_widget
BingMapPro__version

Browser metrics Passed 4 tests

An overview of browser requirements for WP Bing Map Pro
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲20614.43 ▼0.161.79 ▲0.0338.23 ▼6.79
Dashboard /wp-admin2,343 ▲1575.87 ▲0.95102.12 ▼14.0182.48 ▲37.22
Posts /wp-admin/edit.php2,241 ▲1521.99 ▼0.0240.43 ▲2.7535.40 ▲1.88
Add New Post /wp-admin/post-new.php1,659 ▲14517.48 ▼0.12755.15 ▲76.8461.60 ▲4.45
Media Library /wp-admin/upload.php1,543 ▲1554.26 ▲0.03104.21 ▲1.0686.96 ▲42.82
WP Bing Map Pro /wp-admin/admin.php?page=BingMapPro_Plugin_Maps1,7143.9262.9775.34
Shapes /wp-admin/admin.php?page=BingMapPro_Plugin_Shapes2,82514.31308.7398.36
Permissions /wp-admin/admin.php?page=BingMapPro_Plugin_Permissions1,8624.0557.9573.68
Pins /wp-admin/admin.php?page=BingMapPro_Plugin_Pins2,53212.41220.0081.92
Settings /wp-admin/admin.php?page=BingMapPro_Plugin_Settings2,0574.0859.2483.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • 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 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 20× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/api-bing-map-2018/includes/BingMapPro_Config.php
    • > /wp-content/plugins/api-bing-map-2018/includes/BingMapPro_InstallIndicator.php
    • > /wp-content/plugins/api-bing-map-2018/includes/BingMapPro_Pins.php
    • > /wp-content/plugins/api-bing-map-2018/includes/BingMapPro_Includes.php
    • > /wp-content/plugins/api-bing-map-2018/includes/BingMapPro_MasterPins.php
    • > /wp-content/plugins/api-bing-map-2018/includes/BingMapPro_ShortCodeLoader.php
    • > /wp-content/plugins/api-bing-map-2018/wp-bing-map-pro.php
    • > /wp-content/plugins/api-bing-map-2018/includes/BingMapPro_Permissions.php
    • > /wp-content/plugins/api-bing-map-2018/includes/BingMapPro_LifeCycle.php
    • > /wp-content/plugins/api-bing-map-2018/includes/BingMapPro_Shapes.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=BingMapPro_Plugin_Shapes
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=BingMapPro_Plugin_Shapes 283 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=BingMapPro_Plugin_Shapes
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=BingMapPro_Plugin_Shapes 421 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=BingMapPro_Plugin_Shapes
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=BingMapPro_Plugin_Shapes 569 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=BingMapPro_Plugin_Pins
    • > Console-api (severe) in unknown
    https://r.bing.com/rp/iJdNB5JyjS5pG1s-BLESPVZlXRE.br.js 0:202032 "The specified credentials are invalid. You can sign up for a free developer account at http://www.bingmapsportal.com"

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 to be fixed: The official readme.txt is a good inspiration

api-bing-map-2018/wp-bing-map-pro.php 85% from 13 tests

"WP Bing Map Pro" version 5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("api-bing-map-2018.php" instead of "wp-bing-map-pro.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
Everything looks great! No dangerous files found in this plugin44,901 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
CSS193,5559315,276
PO File204,9406,91511,412
SVG4008,612
JavaScript141,2291994,831
PHP221,159574,770

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity14.58
▷ Minimum class complexity2.00
▷ Maximum class complexity154.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces13
Interfaces0
Traits0
Classes19
▷ Abstract classes210.53%
▷ Concrete classes1789.47%
▷ Final classes00.00%
Methods187
▷ Static methods2010.70%
▷ Public methods14376.47%
▷ Protected methods3820.32%
▷ Private methods63.21%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.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
730 PNG files occupy 0.80MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/custom-icons/caraccident.png0.87KB0.54KB▼ 37.36%
images/icons/custom-icons/cruiseship.png0.74KB0.50KB▼ 31.56%
images/icons/custom-icons/umbrella-2.png1.14KB0.86KB▼ 24.91%
images/icons/custom-icons/kebab.png0.92KB0.65KB▼ 29.59%
images/icons/custom-icons/japanese-sake.png1.00KB0.64KB▼ 35.65%