94% map-for-acf

Code Review | Yandex Map for ACF

WordPress plugin Yandex Map for ACF scored 94% from 54 tests.

About plugin

  • Plugin page: map-for-acf
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.1
  • WordPress version: 5.9.2
  • First release: Nov 2, 2015
  • Latest release: Jan 31, 2017
  • Number of updates: 7
  • Update frequency: every 65.1 days
  • Top authors: joker-bs (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active / 3,876 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼306.73ms] Passed 4 tests

A check of server-side resources used by Yandex Map for ACF
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0259.84 ▲8.94
Dashboard /wp-admin3.42 ▲0.0133.81 ▼1.18
Posts /wp-admin/edit.php3.66 ▲0.0137.40 ▲1.43
Add New Post /wp-admin/post-new.php6.90 ▼0.0793.46 ▼1,221.41
Media Library /wp-admin/upload.php3.31 ▲0.0025.26 ▼5.77

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Yandex Map for ACF
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.78 ▲0.245.60 ▼0.232.27 ▼0.44
Dashboard /wp-admin2,895 ▲406.10 ▼0.12118.15 ▼17.36155.54 ▼2.76
Posts /wp-admin/edit.php2,688 ▼03.23 ▲0.0062.51 ▼2.42140.52 ▼0.89
Add New Post /wp-admin/post-new.php1,661 ▼6216.09 ▼0.65408.47 ▼23.48157.26 ▼5.34
Media Library /wp-admin/upload.php1,698 ▼35.54 ▼0.00142.00 ▼6.12191.99 ▲3.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/map-for-acf/acf-yandex-map.php:17

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: acf, map

map-for-acf/acf-yandex-map.php 92% from 13 tests

"Yandex Map for ACF" version 1.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: Name the main plugin file the same as the plugin slug ("map-for-acf.php" instead of "acf-yandex-map.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 detected811 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP3120165375
JavaScript5134102349
PO File1282873
JSON10014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected