68% dl-yandex-metrika

Code Review | DL Yandex Metrika

WordPress plugin DL Yandex Metrika scored68%from 54 tests.

About plugin

  • Plugin page: dl-yandex-metrika
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.1
  • WordPress version: 6.3.1
  • First release: Jul 17, 2015
  • Latest release: Mar 8, 2019
  • Number of updates: 57
  • Update frequency: every 23.3 days
  • Top authors: dyadyalesha (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active /37,833 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.95MB] [CPU: ▼30.98ms] Passed 4 tests

Server-side resources used by DL Yandex Metrika
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.27 ▲4.19
Dashboard /wp-admin2.99 ▼0.3122.33 ▼22.04
Posts /wp-admin/edit.php2.99 ▼0.3621.35 ▼25.17
Add New Post /wp-admin/post-new.php2.99 ▼2.8924.03 ▼65.44
Media Library /wp-admin/upload.php2.99 ▼0.2322.92 ▼11.27

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for DL Yandex Metrika
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.36 ▼1.211.65 ▲0.0243.23 ▼1.52
Dashboard /wp-admin2,218 ▲334.87 ▼0.05101.41 ▼3.6038.51 ▼4.16
Posts /wp-admin/edit.php2,101 ▲91.99 ▲0.0334.52 ▼0.5335.66 ▲1.26
Add New Post /wp-admin/post-new.php1,557 ▲2322.80 ▼0.47669.36 ▼6.8954.59 ▼10.71
Media Library /wp-admin/upload.php1,394 ▲94.27 ▲0.0997.65 ▼4.3542.24 ▼3.81

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
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dl-yandex-metrika/page-dashboard.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dl-yandex-metrika/page-traffic.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dl-yandex-metrika/page-sources-summary.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dl-yandex-metrika/dl-yandex-metrika.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dl-yandex-metrika/page-sources-sites.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dl-yandex-metrika/page-sources-search-phrases.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dl-yandex-metrika/page-inpage.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dl-yandex-metrika/page-sources-social.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dl-yandex-metrika/page-search-engines.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dl-yandex-metrika/page-install.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/dl-yandex-metrika/page-settings.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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:
  • Screenshots: Please add images for these screenshots: #1 (Виджеты в консоли), #2 (Страница "Посещаемость"), #3 (Страница "География"), #4 (Страница "Демография")
Please take inspiration from this readme.txt

dl-yandex-metrika/dl-yandex-metrika.php 92% from 13 tests

The entry point to "DL Yandex Metrika" version 1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 570 characters long)

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 plugin1,166 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP12235111,166

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.41MB with 0.27MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png92.08KB31.47KB▼ 65.82%
screenshot-2.png105.33KB36.12KB▼ 65.70%
screenshot-4.png98.31KB32.68KB▼ 66.76%
screenshot-3.png126.36KB50.50KB▼ 60.03%