73% bbggooglemaps

Code Review | bbgGoogleMaps

WordPress plugin bbgGoogleMaps scored73%from 54 tests.

About plugin

  • Plugin page: bbggooglemaps
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.3-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 22, 2017
  • Latest release: Apr 22, 2017
  • Number of updates: 22
  • Update frequency: every 0.1 days
  • Top authors: bitbrewgmbh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,166 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼34.28ms] Passed 4 tests

Analyzing server-side resources used by bbgGoogleMaps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0629.16 ▼8.22
Dashboard /wp-admin3.00 ▼0.3422.77 ▼35.16
Posts /wp-admin/edit.php3.00 ▼0.3531.12 ▼15.54
Add New Post /wp-admin/post-new.php3.00 ▼2.8823.23 ▼78.21
Media Library /wp-admin/upload.php3.00 ▼0.2223.34 ▼8.10

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
bbgGoogleMaps_AccessLevel
widget_theysaidso_widget
bbgGoogleMaps_DefaultMarker
widget_recent-posts
can_compress_scripts
bbgGoogleMaps_DefaultMap
db_upgraded
bbgGoogleMaps_CurVersion
widget_recent-comments

Browser metrics Passed 4 tests

bbgGoogleMaps: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲20015.22 ▲0.6410.77 ▲9.0942.99 ▼0.03
Dashboard /wp-admin2,230 ▲425.75 ▲0.86109.06 ▲2.2338.60 ▼1.75
Posts /wp-admin/edit.php2,113 ▲242.49 ▲0.5147.64 ▲5.5433.88 ▼1.97
Add New Post /wp-admin/post-new.php1,546 ▲2923.57 ▲6.03681.48 ▲67.4355.19 ▲3.09
Media Library /wp-admin/upload.php1,412 ▲245.04 ▲0.87106.89 ▲9.1245.54 ▲2.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/bbggooglemaps/functions/bbg-google-maps-admin.php+26
    Undefined variable: bbgGoogleMaps
  • This plugin does not fully uninstall, leaving 10 options in the database
    • can_compress_scripts
    • bbgGoogleMaps_DefaultMarker
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • bbgGoogleMaps_CurVersion
    • bbgGoogleMaps_AccessLevel
    • bbgGoogleMaps_DefaultMap

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bbggooglemaps/plugin.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bbggooglemaps/templates/single-location.php:1

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (The "Free" version of bbgGoogleMaps), #2 (bbgGoogleMaps Tab "Api Key"), #3 (bbgGoogleMaps Tab "Maps"), #4 (bbgGoogleMaps Tab "Marker"), #5 (bbgGoogleMaps Tab "Extensions")
You can look at the official readme.txt

bbggooglemaps/plugin.php 85% from 13 tests

The entry point to "bbgGoogleMaps" version 1.0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, 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 ("bbggooglemaps.php" instead of "plugin.php")

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
Everything looks great! No dangerous files found in this plugin1,199 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP13141131751
CSS13516220
PO File16166145
JavaScript118583

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity16.00
▷ Minimum class complexity13.00
▷ Maximum class complexity19.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods2586.21%
▷ Protected methods413.79%
▷ Private methods00.00%
Functions23
▷ Named functions2191.30%
▷ Anonymous functions28.70%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin