100% acf-leaflet-map-field

Code Review | Advanced Custom Fields: Leaflet Map Field

WordPress plugin Advanced Custom Fields: Leaflet Map Field scored 100% from 54 tests.

About plugin

  • Plugin page: acf-leaflet-map-f...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-4.5
  • WordPress version: 5.9.2
  • First release: Jul 4, 2018
  • Latest release: Jul 4, 2018
  • Number of updates: 5
  • Update frequency: every 3.6 days
  • Top authors: unscuzzy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active / 3,052 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼295.33ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Custom Fields: Leaflet Map Field
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0152.81 ▲4.18
Dashboard /wp-admin3.42 ▲0.0134.49 ▼2.08
Posts /wp-admin/edit.php3.65 ▲0.0139.65 ▼0.49
Add New Post /wp-admin/post-new.php6.90 ▼0.0896.62 ▼1,175.92
Media Library /wp-admin/upload.php3.30 ▼0.0025.18 ▼2.83

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Custom Fields: Leaflet Map Field
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,813 ▲5916.20 ▲0.235.72 ▼0.162.46 ▼0.36
Dashboard /wp-admin2,921 ▲346.39 ▼0.06133.82 ▼8.50161.14 ▲0.80
Posts /wp-admin/edit.php2,694 ▼03.43 ▲0.0062.06 ▼0.86138.13 ▼6.16
Add New Post /wp-admin/post-new.php1,752 ▲9221.12 ▲4.45439.45 ▲33.89159.76 ▼13.60
Media Library /wp-admin/upload.php1,698 ▲35.75 ▲0.02141.43 ▲6.39194.85 ▲6.55

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

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

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 everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: wordpress, plugin, acf, leaflet

acf-leaflet-map-field/acf-leaflet-field.php 92% from 13 tests

The primary PHP file in "Advanced Custom Fields: Leaflet Map Field" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("acf-leaflet-map-field.php" instead of "acf-leaflet-field.php")

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
There were no executable files found in this plugin994 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33763809
PHP393234149
PO File181236

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity8.50
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin