72% mihdan-yandex-turbo-feed

Code Review | Mihdan: Yandex Turbo Feed

WordPress plugin Mihdan: Yandex Turbo Feed scored72%from 54 tests.

About plugin

  • Plugin page: mihdan-yandex-tur...
  • Plugin version: 1.6.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Jan 31, 2018
  • Latest release: Nov 30, 2023
  • Number of updates: 79
  • Update frequency: every 27.0 days
  • Top authors: mihdan (100%)Otto42 (2.53%)

Code review

54 tests

User reviews

31 reviews

Install metrics

2,000+ active /25,586 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲5.73MB] [CPU: ▲39.18ms] 75% from 4 tests

This is a short check of server-side resources used by Mihdan: Yandex Turbo Feed
The following require your attention
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.73MB on /wp-admin/edit.php?post_type=acf-taxonomy)
PageMemory (MB)CPU Time (ms)
Home /8.78 ▲5.3272.76 ▲32.12
Dashboard /wp-admin9.14 ▲5.8094.80 ▲33.67
Posts /wp-admin/edit.php9.21 ▲5.8594.68 ▲49.29
Add New Post /wp-admin/post-new.php12.05 ▲6.16137.60 ▲41.65
Media Library /wp-admin/upload.php9.18 ▲5.9586.15 ▲52.92
Field Groups /wp-admin/edit.php?post_type=acf-field-group9.1880.39
Add Feed /wp-admin/post-new.php?post_type=mihdan_yandex_turbo9.54102.55
Post Types /wp-admin/edit.php?post_type=acf-post-type9.1890.43
All Feeds /wp-admin/edit.php?post_type=mihdan_yandex_turbo9.1473.00
Taxonomies /wp-admin/edit.php?post_type=acf-taxonomy9.1979.47

Server storage [IO: ▲15.96MB] [DB: ▲0.05MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 683 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
acf_version
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Mihdan: Yandex Turbo Feed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲9914.33 ▼0.381.94 ▲0.3035.71 ▼7.28
Dashboard /wp-admin2,226 ▲495.60 ▼0.1197.59 ▼0.0541.59 ▼3.89
Posts /wp-admin/edit.php2,231 ▲1282.19 ▲0.2437.89 ▼1.0639.34 ▲6.72
Add New Post /wp-admin/post-new.php6,812 ▲5,27725.49 ▲2.241,057.18 ▲339.1454.38 ▼8.70
Media Library /wp-admin/upload.php1,983 ▲5808.32 ▲4.15226.26 ▲124.6850.56 ▲4.79
Field Groups /wp-admin/edit.php?post_type=acf-field-group1,6402.2839.6588.09
Add Feed /wp-admin/post-new.php?post_type=mihdan_yandex_turbo5,2919.45255.8968.23
Post Types /wp-admin/edit.php?post_type=acf-post-type1,6702.2739.7542.36
All Feeds /wp-admin/edit.php?post_type=mihdan_yandex_turbo1,1192.1234.0235.17
Taxonomies /wp-admin/edit.php?post_type=acf-taxonomy1,6772.4239.4242.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • acf_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=acf-post-type
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 234× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mihdan-yandex-turbo-feed/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mihdan-yandex-turbo-feed/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/mihdan-yandex-turbo-feed/vendor/advanced-custom-fields/includes/admin/views/acf-taxonomy/list-empty.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_render_field_wrap() in wp-content/plugins/mihdan-yandex-turbo-feed/vendor/advanced-custom-fields/includes/admin/views/acf-taxonomy/basic-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mihdan-yandex-turbo-feed/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'StoutLogic\\AcfBuilder\\Transform\\RecursiveTransform' not found in wp-content/plugins/mihdan-yandex-turbo-feed/vendor/stoutlogic/acf-builder/src/Transform/NamespaceFieldKey.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mihdan-yandex-turbo-feed/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/mihdan-yandex-turbo-feed/vendor/stoutlogic/acf-builder/tests/FieldsBuilderCustomFieldKeysTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/mihdan-yandex-turbo-feed/vendor/stoutlogic/acf-builder/tests/GroupBuilderTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/mihdan-yandex-turbo-feed/vendor/stoutlogic/acf-builder/tests/FieldsBuilderTest.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=mihdan_yandex_turbo
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: inlineEditPost is not defined" "ReferenceError: inlineEditPost is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/mihdan-yandex-turbo-feed/admin/js/app.js?ver=1684239348:37:35)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=mihdan_yandex_turbo
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28721 Uncaught ReferenceError: inlineEditPost is not defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2 in mihdan-yandex-turbo-feed/assets to your readme.txt
  • Tags: There are too many tags (15 tag instead of maximum 10)
The official readme.txt is a good inspiration

mihdan-yandex-turbo-feed/mihdan-yandex-turbo-feed.php Passed 13 tests

Analyzing the main PHP file in "Mihdan: Yandex Turbo Feed" version 1.6.4
111 characters long description:
Плагин создаёт настраиваемые ленты для сервиса Яндекс Турбо

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin197,896 lines of code in 567 files:
LanguageFilesBlank linesComment linesLines of code
PO File4644,32867,629106,344
JavaScript215,3517,50039,670
PHP38412,21125,27338,307
CSS167341,51112,604
JSON100389
SVG9200273
YAML4393139
Markdown129087
reStructuredText1747875
XML1008

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.33
Average class complexity9.28
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces21
Interfaces4
Traits1
Classes319
▷ Abstract classes92.82%
▷ Concrete classes31097.18%
▷ Final classes289.03%
Methods1,748
▷ Static methods844.81%
▷ Public methods1,58790.79%
▷ Protected methods975.55%
▷ Private methods643.66%
Functions568
▷ Named functions53594.19%
▷ Anonymous functions335.81%
Constants37
▷ Global constants1540.54%
▷ Class constants2259.46%
▷ Public constants2090.91%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
43 PNG files occupy 0.86MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/advanced-custom-fields/assets/images/field-type-previews/field-preview-checkbox.png12.59KB6.28KB▼ 50.12%
vendor/advanced-custom-fields/assets/images/field-type-previews/field-preview-page-link.png9.63KB5.03KB▼ 47.77%
vendor/advanced-custom-fields/assets/images/field-type-previews/field-preview-password.png11.38KB5.84KB▼ 48.68%
vendor/advanced-custom-fields/assets/images/field-type-previews/field-preview-post-object.png9.57KB4.92KB▼ 48.64%
vendor/advanced-custom-fields/assets/images/field-type-previews/field-preview-time.png10.38KB5.59KB▼ 46.14%