90% acf-leaflet-map-field

Code Review | Advanced Custom Fields: Leaflet Map Field

WordPress plugin Advanced Custom Fields: Leaflet Map Field scored 90% 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: 6.3.1
  • 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

400+ active / 3,871 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.17ms] Passed 4 tests

Analyzing server-side resources used by Advanced Custom Fields: Leaflet Map Field
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.89 ▼0.31
Dashboard /wp-admin3.31 ▲0.0144.37 ▼4.13
Posts /wp-admin/edit.php3.36 ▲0.0045.84 ▼1.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.91 ▼14.64
Media Library /wp-admin/upload.php3.23 ▲0.0036.10 ▲0.50

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, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields: Leaflet Map Field
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▼0.261.63 ▼0.3940.32 ▼6.70
Dashboard /wp-admin2,206 ▲184.89 ▼1.00109.78 ▼4.2837.61 ▼3.06
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.1739.13 ▼0.6735.30 ▲1.42
Add New Post /wp-admin/post-new.php1,514 ▼517.68 ▼5.39666.05 ▲18.0754.88 ▼5.48
Media Library /wp-admin/upload.php1,391 ▼04.17 ▼0.0694.31 ▼3.0842.62 ▼2.58

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: acf, leaflet, wordpress, plugin

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

The main PHP file in "Advanced Custom Fields: Leaflet Map Field" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be 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 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected994 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33763809
PHP393234149
PO File181236

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin