68% acfyandex

Code Review | ACF:Yandex

WordPress plugin ACF:Yandex scored68%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: 6.3.1
  • 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 /973 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.84MB] [CPU: ▼58.00ms] Passed 4 tests

A check of server-side resources used by ACF:Yandex
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.315.62 ▼42.29
Dashboard /wp-admin2.17 ▼1.138.74 ▼46.10
Posts /wp-admin/edit.php2.17 ▼1.187.67 ▼47.46
Add New Post /wp-admin/post-new.php2.17 ▼3.716.26 ▼96.13
Media Library /wp-admin/upload.php2.17 ▼1.067.34 ▼27.63
ACF:Yandex /wp-admin/options-general.php?page=acfyandex2.178.64

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for ACF:Yandex
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲7532.48 ▲18.2281.56 ▲79.5739.95 ▼5.79
Dashboard /wp-admin2,221 ▲4117.41 ▲11.73212.02 ▲121.7043.14 ▲1.63
Posts /wp-admin/edit.php2,132 ▲2913.81 ▲11.81129.98 ▲90.5035.47 ▼1.15
Add New Post /wp-admin/post-new.php1,708 ▲17733.48 ▲10.15769.80 ▲141.2339.78 ▼9.97
Media Library /wp-admin/upload.php1,435 ▲3515.67 ▲11.47184.37 ▲79.0648.69 ▲6.73
ACF:Yandex /wp-admin/options-general.php?page=acfyandex7405.10117.0728.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method acfyandex_plugin::pluginloaded() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=acfyandex
    • > Deprecated in wp-includes/class-wp-hook.php+310
    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+310
    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+310
    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+310
    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+310
    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+310
    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+310
    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+310
    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+1824
    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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > 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=6.3.1 0:28789 "(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=6.3.1 9:17 Uncaught TypeError: Cannot read properties of null (reading 'getAttribute')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: yandex, acf, map, advanced custom fields

acfyandex/acfyandex.php 92% from 13 tests

The primary PHP file in "ACF:Yandex" version 1.7 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • 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 | There should be no dangerous file extensions present in any WordPress 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

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin