94% advanced-custom-fields-mapbox-geojson-field

Code Review | Advanced Custom Fields: Mapbox geoJSON Field

WordPress plugin Advanced Custom Fields: Mapbox geoJSON Field scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 5.8.1
  • First release: Apr 21, 2015
  • Latest release: Apr 26, 2015
  • Number of updates: 8
  • Update frequency: every 0.6 days
  • Top authors: jensnilsson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,944 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Advanced Custom Fields: Mapbox geoJSON Field
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.29 ▲13.65
Dashboard /wp-admin3.06 ▲0.0147.41 ▼1.53
Posts /wp-admin/edit.php3.12 ▲0.0150.08 ▲5.19
Add New Post /wp-admin/post-new.php5.42 ▼0.01100.53 ▼568.81
Media Library /wp-admin/upload.php3.01 ▲0.0036.20 ▼1.83

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields: Mapbox geoJSON Field
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.22 ▲0.208.56 ▼2.5452.60 ▲3.75
Dashboard /wp-admin2,970 ▲395.88 ▼0.18145.30 ▼6.73120.08 ▼0.61
Posts /wp-admin/edit.php2,736 ▼32.69 ▼0.0071.93 ▲6.50100.79 ▲0.93
Add New Post /wp-admin/post-new.php1,591 ▲1018.73 ▼1.66391.17 ▼16.01113.48 ▼3.55
Media Library /wp-admin/upload.php1,807 ▼05.00 ▼0.03156.33 ▲1.42135.80 ▲5.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-mapbox-geojson-field/acf-mapbox_geojson-v4.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-mapbox-geojson-field/acf-mapbox_geojson-v5.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/advanced-custom-fields-mapbox-geojson-field/acf-mapbox_geojson.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

advanced-custom-fields-mapbox-geojson-field/acf-mapbox_geojson.php 92% from 13 tests

"Advanced Custom Fields: Mapbox geoJSON Field" version 0.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-custom-fields-mapbox-geojson-field.php" instead of "acf-mapbox_geojson.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin563 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript15329257
PHP3264563216
Stylus10088
CSS1001
Markdown1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin