83% acf-openstreetmap-field-block

Code Review | ACF OpenStreetMap Field into a Block

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

About plugin

  • Plugin page: acf-openstreetmap...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • 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 /462 total downloads

Benchmarks

Plugin footprint 83% 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.02MB] [CPU: ▼4.37ms] Passed 4 tests

This is a short check of server-side resources used by ACF OpenStreetMap Field into a Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.87 ▲6.28
Dashboard /wp-admin3.32 ▲0.0249.73 ▲0.24
Posts /wp-admin/edit.php3.37 ▲0.0251.02 ▼1.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.13 ▼10.21
Media Library /wp-admin/upload.php3.24 ▲0.0234.21 ▼6.21

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

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 /2,789 ▲2814.69 ▲0.131.67 ▼0.0244.28 ▼5.65
Dashboard /wp-admin2,192 ▲125.62 ▲0.0493.71 ▲1.0941.03 ▼1.35
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0242.11 ▲2.7735.60 ▼3.41
Add New Post /wp-admin/post-new.php1,526 ▼923.10 ▲4.94619.24 ▼63.0059.66 ▼7.99
Media Library /wp-admin/upload.php1,403 ▲64.19 ▼0.2197.58 ▼20.2645.28 ▼1.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > 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 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Very simple field powered by the plugin ACF OpenStreetMap Field), #2 (You can set multiple locations on the map)
The official readme.txt might help

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

Analyzing the main PHP file in "ACF OpenStreetMap Field into a Block" version 1.0
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("/lang/")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin96 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1132496

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin