78% acfyandex

Code Review | ACF:Yandex

WordPress plugin ACF:Yandex scored 78% from 54 tests.

About plugin

  • Plugin page: acfyandex
  • Plugin version: 1.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.3
  • WordPress version: 5.9.2
  • First release: Dec 10, 2019
  • Latest release: Jan 10, 2020
  • Number of updates: 13
  • Update frequency: every 2.5 days
  • Top authors: programmiste1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 608 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼2.37MB] [CPU: ▼350.81ms] Passed 4 tests

Server-side resources used by ACF:Yandex
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.00 ▼1.524.49 ▼47.63
Dashboard /wp-admin2.02 ▼1.394.74 ▼27.93
Posts /wp-admin/edit.php2.02 ▼1.624.38 ▼31.14
Add New Post /wp-admin/post-new.php2.02 ▼4.954.56 ▼1,296.54
Media Library /wp-admin/upload.php2.02 ▼1.283.89 ▼20.46
ACF:Yandex /wp-admin/options-general.php?page=acfyandex2.023.98

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for ACF:Yandex
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,863 ▲10934.87 ▲18.8597.17 ▲89.922.53 ▲0.10
Dashboard /wp-admin2,921 ▲6618.65 ▲12.49208.24 ▲64.71174.03 ▲6.26
Posts /wp-admin/edit.php2,705 ▲1414.04 ▲11.02149.39 ▲85.85140.14 ▼5.34
Add New Post /wp-admin/post-new.php1,668 ▲229.02 ▲8.56489.01 ▲89.68148.68 ▼5.09
Media Library /wp-admin/upload.php1,725 ▲2416.79 ▲11.32228.57 ▲91.10189.84 ▲3.62
ACF:Yandex /wp-admin/options-general.php?page=acfyandex1,14414.10143.34135.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method acfyandex_plugin::pluginloaded() should not be called statically

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method acfyandex_plugin::pluginloaded() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method acfyandex_plugin::plugininit() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method acfyandex_plugin::pluginmenu() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method acfyandex_plugin::startSession() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method acfyandex_plugin::option_settings() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method acfyandex_plugin::acfyandex_scriptsinit() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Warning in wp-content/plugins/acfyandex/acfyandex.php+184
    array_key_exists() expects parameter 2 to be array, bool given
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Warning in wp-includes/class-wp-hook.php+307
    call_user_func_array() expects parameter 1 to be a valid callback, class 'acfyandex_plugin' does not have a method 'message_admin_error'
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method acfyandex_plugin::formsetup() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Deprecated in wp-admin/includes/template.php+1743
    Non-static method acfyandex_plugin::option_display_settings() should not be called statically
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Notice in wp-content/plugins/acfyandex/acfyandex.php+133
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Notice in wp-content/plugins/acfyandex/acfyandex.php+136
    Undefined variable: desc

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Console-api (warning) in unknown
    http://api-maps.yandex.ru/2.1/?apikey&lang=ru_RU&ver=5.9.2 0:28764 "(Yandex Maps JS API): Invalid API key"
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Javascript (severe) in unknown
    /wp-content/plugins/acfyandex/assets/js/acfyandex-v5_client.js?ver=5.9.2 9:17 Uncaught TypeError: Cannot read properties of null (reading 'getAttribute')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: acf, advanced custom fields, map, yandex

acfyandex/acfyandex.php 92% from 13 tests

"ACF:Yandex" version 1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin444 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP34115268
PO File1172886
JavaScript318684
CSS1196

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity23.33
▷ Minimum class complexity4.00
▷ Maximum class complexity61.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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