83% simple-yandex-metrika

Code Review | Simple Yandex Metrika

WordPress plugin Simple Yandex Metrika scored 83% from 54 tests.

About plugin

  • Plugin page: simple-yandex-met...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.7.0
  • WordPress version: 6.3.1
  • First release: May 12, 2021
  • Latest release: May 12, 2021
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: hayk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 306 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
Install script ran successfully

Server metrics [RAM: ▼0.34MB] [CPU: ▼13.61ms] Passed 4 tests

This is a short check of server-side resources used by Simple Yandex Metrika
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.23 ▼42.30
Dashboard /wp-admin3.32 ▲0.0246.37 ▼2.72
Posts /wp-admin/edit.php3.37 ▲0.0147.24 ▼0.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.32 ▼8.61
Media Library /wp-admin/upload.php3.24 ▲0.0134.20 ▲1.75
Simple Yandex Metrika /wp-admin/options-general.php?page=simple-yandexmetrika3.2132.04

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
sym_tracking_id
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Simple Yandex Metrika
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.194.55 ▲2.7642.49 ▲3.07
Dashboard /wp-admin2,210 ▲224.83 ▼1.06107.86 ▼8.3641.29 ▼0.21
Posts /wp-admin/edit.php2,093 ▲12.03 ▲0.0240.57 ▼3.8037.55 ▲1.79
Add New Post /wp-admin/post-new.php1,536 ▼623.26 ▲5.12576.26 ▼44.1847.75 ▼0.89
Media Library /wp-admin/upload.php1,395 ▲104.17 ▼0.1199.46 ▼5.1844.44 ▲1.83
Simple Yandex Metrika /wp-admin/options-general.php?page=simple-yandexmetrika7902.0625.6226.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • sym_tracking_id
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/simple-yandex-metrika/options.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/simple-yandex-metrika/yandexmetrika.php:78

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: analytics, yandex, javascript, yandexmetrika

simple-yandex-metrika/yandexmetrika.php 77% from 13 tests

The main PHP script in "Simple Yandex Metrika" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-yandex-metrika.php" instead of "yandexmetrika.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; 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
Good job! No executable or dangerous file extensions detected66 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2243066

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin