90% map-block-gutenberg

Code Review | Map Block for Google Maps

WordPress plugin Map Block for Google Maps scored90%from 54 tests.

About plugin

  • Plugin page: map-block-gutenberg
  • Plugin version: 1.33
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Jan 15, 2018
  • Latest release: Oct 1, 2023
  • Number of updates: 56
  • Update frequency: every 37.2 days
  • Top authors: WebFactory (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

20,000+ active /128,363 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.83ms] Passed 4 tests

An overview of server-side resources used by Map Block for Google Maps
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.84 ▼2.64
Dashboard /wp-admin3.34 ▲0.0345.02 ▼5.38
Posts /wp-admin/edit.php3.39 ▲0.0345.72 ▼5.02
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.81 ▼10.17
Media Library /wp-admin/upload.php3.26 ▲0.0335.19 ▼2.76

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Map Block for Google Maps
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.351.93 ▼0.0344.15 ▼2.16
Dashboard /wp-admin2,198 ▲215.63 ▲0.1085.78 ▼8.0440.38 ▼1.47
Posts /wp-admin/edit.php2,097 ▼31.98 ▼0.0536.22 ▼4.3138.01 ▲1.46
Add New Post /wp-admin/post-new.php6,367 ▲4,83228.29 ▲9.93919.28 ▲280.0461.33 ▼11.90
Media Library /wp-admin/upload.php1,400 ▼34.24 ▲0.0894.06 ▼9.4742.23 ▼9.33

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
7 plugin tags: google maps, maps for gutenberg, map, google maps for gutenberg, block...

map-block-gutenberg/map-block-gutenberg.php Passed 13 tests

The main PHP script in "Map Block for Google Maps" version 1.33 is automatically included on every request by WordPress
74 characters long description:
Simple, no-nonsense map block powered by Google Maps for Gutenberg editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected9,632 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JSON3008,876
JavaScript6225145608
PHP23931107
CSS210841

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods9100.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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 files were detected