68% bingmaps

Code Review | MapView for Bing Maps

WordPress plugin MapView for Bing Maps scored68%from 54 tests.

About plugin

  • Plugin page: bingmaps
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 22, 2013
  • Latest release: Aug 10, 2023
  • Number of updates: 45
  • Update frequency: every 85.6 days
  • Top authors: Malcolm-OPH (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,682 total downloads

Benchmarks

Plugin footprint 65% 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.53MB] [CPU: ▲1.50ms] Passed 4 tests

This is a short check of server-side resources used by MapView for Bing Maps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5445.05 ▼0.29
Dashboard /wp-admin3.83 ▲0.5353.84 ▲2.13
Posts /wp-admin/edit.php3.89 ▲0.5355.59 ▲4.84
Add New Post /wp-admin/post-new.php6.42 ▲0.53104.46 ▼0.69
Media Library /wp-admin/upload.php3.76 ▲0.5348.50 ▲14.64
Settings /wp-admin/admin.php?page=bingmaps_settings4.4250.17
Overview /wp-admin/admin.php?page=bingmaps_adminmenu4.1643.49

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 22 new files
Database: 2 new tables, 6 new options
New tables
wp_sessions
wp_mjslibOptions
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

An overview of browser requirements for MapView for Bing Maps
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10113.31 ▼1.061.57 ▼0.3743.34 ▼0.65
Dashboard /wp-admin2,238 ▲475.86 ▲0.9997.69 ▼8.0278.22 ▲33.50
Posts /wp-admin/edit.php2,120 ▲311.97 ▼0.0738.93 ▲4.2336.37 ▼0.13
Add New Post /wp-admin/post-new.php1,695 ▲16222.35 ▼0.87674.60 ▼14.7446.77 ▼13.01
Media Library /wp-admin/upload.php1,417 ▲294.25 ▲0.01104.06 ▼0.9873.23 ▲28.04
Settings /wp-admin/admin.php?page=bingmaps_settings1,0102.0430.8424.78
Overview /wp-admin/admin.php?page=bingmaps_adminmenu9012.0526.8628.73

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_mjslibOptions
    • wp_sessions
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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 | 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 fix the following items
  • 29× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant BINGMAPSLIB_INCLUDE_PATH - assumed 'BINGMAPSLIB_INCLUDE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bingmaps/include/bingmapslib_dbase_api.php on line 23
    • > PHP Warning
      include(): Failed opening 'BINGMAPSLIB_INCLUDE_PATHbingmapslib_admin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/bingmaps/include/bingmapslib_debug.php on line 23
    • > PHP Warning
      include(BINGMAPSLIB_INCLUDE_PATHbingmapslib_table.php): failed to open stream: No such file or directory in wp-content/plugins/bingmaps/include/bingmapslib_adminlist.php on line 23
    • > PHP Warning
      Use of undefined constant BINGMAPS_INCLUDE_PATH - assumed 'BINGMAPS_INCLUDE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bingmaps/admin/bingmaps_manage_overview.php on line 23
    • > PHP Fatal error
      Uncaught Error: Class 'BingMapsLibTableClass' not found in wp-content/plugins/bingmaps/include/bingmapslib_adminlist.php:27
    • > PHP Warning
      Use of undefined constant BINGMAPS_INCLUDE_PATH - assumed 'BINGMAPS_INCLUDE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bingmaps/admin/bingmaps_manage_settings.php on line 24
    • > PHP Warning
      include(): Failed opening 'BINGMAPSLIB_INCLUDE_PATHbingmapslib_table.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/bingmaps/include/bingmapslib_debug.php on line 24
    • > PHP Warning
      include(BINGMAPS_INCLUDE_PATHbingmapslib_admin.php): failed to open stream: No such file or directory in wp-content/plugins/bingmaps/admin/bingmaps_manage_settings.php on line 24
    • > PHP Warning
      include(BINGMAPSLIB_INCLUDE_PATHbingmapslib_admin.php): failed to open stream: No such file or directory in wp-content/plugins/bingmaps/include/bingmapslib_debug.php on line 23
    • > PHP Warning
      include(): Failed opening 'BINGMAPS_INCLUDE_PATHbingmapslib_adminlist.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/bingmaps/admin/bingmaps_manage_overview.php on line 23

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bingmaps_adminmenu
    • > Network (severe)
    wp-content/plugins/bingmaps/admin/images/salesman16grey.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: bing, walking, ordnance survey, maps, pages...

bingmaps/bingmaps.php Passed 13 tests

This is the main PHP file of "MapView for Bing Maps" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
48 characters long description:
Adds a map to a web page using the Bing Maps API

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin5,802 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP151,4245035,791
CSS1102011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity42.65
▷ Minimum class complexity1.00
▷ Maximum class complexity241.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods366
▷ Static methods8924.32%
▷ Public methods36499.45%
▷ Protected methods00.00%
▷ Private methods20.55%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants127
▷ Global constants5039.37%
▷ Class constants7760.63%
▷ Public constants77100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/poi_red.png27.76KB0.89KB▼ 96.79%
images/poi_orange.png0.63KB0.65KB0.00%
images/poi_blue.png1.29KB1.19KB▼ 7.65%