93% acf-openstreetmap-field-block

Code Review | ACF OpenStreetMap Field into a Block

WordPress plugin ACF OpenStreetMap Field into a Block scored 93% from 54 tests.

About plugin

  • Plugin page: acf-openstreetmap...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: May 7, 2021
  • Latest release: May 8, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: julianoe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 176 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼304.91ms] Passed 4 tests

A check of server-side resources used by ACF OpenStreetMap Field into a Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0156.08 ▲6.18
Dashboard /wp-admin3.41 ▲0.0132.24 ▼1.27
Posts /wp-admin/edit.php3.64 ▲0.0137.75 ▼0.12
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.12 ▼1,221.54
Media Library /wp-admin/upload.php3.30 ▲0.0027.18 ▲3.28

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for ACF OpenStreetMap Field into a Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,785 ▲4315.95 ▼0.076.22 ▲0.042.16 ▲0.16
Dashboard /wp-admin2,895 ▲376.13 ▼0.08128.47 ▼4.82157.90 ▼3.92
Posts /wp-admin/edit.php2,685 ▼33.24 ▲0.0061.34 ▼2.76138.63 ▼0.43
Add New Post /wp-admin/post-new.php1,752 ▲9121.11 ▲0.39431.74 ▼0.94156.49 ▲3.60
Media Library /wp-admin/upload.php1,698 ▼35.44 ▼0.05142.86 ▲2.48187.59 ▲5.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-openstreetmap-field-block/acf-openstreetmap-field-block.php:14

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 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Very simple field powered by the plugin ACF OpenStreetMap Field), #2 (You can set multiple locations on the map)
You can look at the official readme.txt

acf-openstreetmap-field-block/acf-openstreetmap-field-block.php 85% from 13 tests

This is the main PHP file of "ACF OpenStreetMap Field into a Block" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("lang/")
  • Domain Path: The domain path must begin with a forward slash character ("/lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected96 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1132496

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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