84% fast-yandex-metrika

Code Review | Fast Yandex Metrika

WordPress plugin Fast Yandex Metrika scored84%from 54 tests.

About plugin

  • Plugin page: fast-yandex-metrika
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8
  • WordPress version: 6.3.1
  • First release: Mar 9, 2021
  • Latest release: Dec 24, 2021
  • Number of updates: 25
  • Update frequency: every 11.6 days
  • Top authors: pss777 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,221 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.19ms] Passed 4 tests

Analyzing server-side resources used by Fast Yandex Metrika
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.59 ▲6.35
Dashboard /wp-admin3.41 ▲0.1049.55 ▲2.10
Posts /wp-admin/edit.php3.46 ▲0.1047.24 ▲5.12
Add New Post /wp-admin/post-new.php5.99 ▲0.1079.52 ▼7.91
Media Library /wp-admin/upload.php3.33 ▲0.1036.60 ▼0.08
Yandex.Metrica /wp-admin/options-general.php?page=fast_yandex_metrika3.2730.87

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Fast Yandex Metrika
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.53 ▼0.061.78 ▼0.0844.40 ▼0.01
Dashboard /wp-admin2,199 ▲225.57 ▲0.0594.00 ▲5.2744.11 ▲3.08
Posts /wp-admin/edit.php2,101 ▲11.98 ▲0.0233.19 ▼3.8635.24 ▼0.45
Add New Post /wp-admin/post-new.php1,534 ▲523.04 ▼0.21665.30 ▲38.1548.16 ▼12.10
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.0296.32 ▲3.3143.19 ▲1.61
Yandex.Metrica /wp-admin/options-general.php?page=fast_yandex_metrika1,1312.0022.5044.72

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fast_yandex_metrika
    • > Notice in wp-content/plugins/fast-yandex-metrika/fast-yandex-metrika.php+585
    Trying to access array offset on value of type null

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: metrica, metrik, metrika, statistics, yandex...

fast-yandex-metrika/fast-yandex-metrika.php Passed 13 tests

The entry point to "Fast Yandex Metrika" version 1.1.4 is a PHP file that has certain tags in its header comment area
60 characters long description:
Plugin for configuring the counter and Yandex Metrica goals.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected918 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP118851494
CSS100176
PO File14652134
SVG20172
JavaScript121042

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions17
▷ Named functions1270.59%
▷ Anonymous functions529.41%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin