84% yandex-metrika

Code Review | Яндекс Метрика

WordPress plugin Яндекс Метрика scored84%from 54 tests.

About plugin

  • Plugin page: yandex-metrika
  • Plugin version: 0.8.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 6.3.1
  • First release: Jun 7, 2013
  • Latest release: Jul 29, 2016
  • Number of updates: 18
  • Update frequency: every 63.8 days
  • Top authors: kovshenin (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

20,000+ active /148,674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.47ms] Passed 4 tests

An overview of server-side resources used by Яндекс Метрика
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.54 ▲0.42
Dashboard /wp-admin3.33 ▲0.0351.09 ▼0.92
Posts /wp-admin/edit.php3.38 ▲0.0347.49 ▼0.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.63 ▼8.64
Media Library /wp-admin/upload.php3.25 ▲0.0335.85 ▲0.07
Yandex Metrika /wp-admin/options-general.php?page=yandex-metrika3.2232.89

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Яндекс Метрика
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.47 ▲0.121.67 ▼0.1743.33 ▼5.84
Dashboard /wp-admin2,213 ▲254.85 ▼1.05101.32 ▼15.9542.74 ▼3.76
Posts /wp-admin/edit.php2,090 ▲12.02 ▼0.0438.51 ▼0.1334.69 ▲0.99
Add New Post /wp-admin/post-new.php1,537 ▲423.11 ▲0.20633.80 ▼28.4952.47 ▼12.00
Media Library /wp-admin/upload.php1,386 ▼24.20 ▼0.0897.17 ▼6.5845.28 ▲0.66
Yandex Metrika /wp-admin/options-general.php?page=yandex-metrika7842.0323.5127.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yandex-metrika/yandex-metrika.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: analytics, metrika, yandex, stats, metrica

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

The main file in "Яндекс Метрика" v. 0.8.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin91 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP111953
PO File17438

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin