84% easy-yandex-metrica

Code Review | Easy Yandex Metrica

WordPress plugin Easy Yandex Metrica scored84%from 54 tests.

About plugin

  • Plugin page: easy-yandex-metrica
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 14, 2020
  • Latest release: May 22, 2023
  • Number of updates: 39
  • Update frequency: every 31.4 days
  • Top authors: abwp (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /12,721 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▲0.70ms] Passed 4 tests

Server-side resources used by Easy Yandex Metrica
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.28 ▼1.07
Dashboard /wp-admin3.47 ▲0.1649.51 ▲2.54
Posts /wp-admin/edit.php3.58 ▲0.2248.35 ▲4.08
Add New Post /wp-admin/post-new.php6.06 ▲0.1783.42 ▼2.76
Media Library /wp-admin/upload.php3.39 ▲0.1637.02 ▲4.31
Sources, Search engine /wp-admin/admin.php?page=abwp_eym_view_sources_engines3.38377.95
Settings /wp-admin/admin.php?page=abwp_eym_settings3.3732.94
Sources, Sites /wp-admin/admin.php?page=abwp_eym_view_sources_sites3.38323.80
Traffic /wp-admin/admin.php?page=abwp_eym3.3734.75
Sources, Summary /wp-admin/admin.php?page=abwp_eym_view_sources_summary3.38325.80
Sources, Social Network /wp-admin/admin.php?page=abwp_eym_view_sources_social3.38323.30

Server storage [IO: ▲0.24MB] [DB: ▲0.31MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
abwp_eym_plugin_version
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Easy Yandex Metrica: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲8113.52 ▼1.121.61 ▼0.1644.88 ▲4.69
Dashboard /wp-admin2,270 ▲965.37 ▼0.2491.61 ▲1.1239.31 ▼4.58
Posts /wp-admin/edit.php2,144 ▲442.49 ▲0.5435.95 ▼1.2732.65 ▼3.99
Add New Post /wp-admin/post-new.php1,559 ▲2824.03 ▲0.88686.44 ▲59.2169.83 ▲20.04
Media Library /wp-admin/upload.php1,444 ▲444.81 ▲0.60107.63 ▲12.2543.02 ▲2.47
Sources, Search engine /wp-admin/admin.php?page=abwp_eym_view_sources_engines8202.3526.8224.21
Settings /wp-admin/admin.php?page=abwp_eym_settings8722.4026.2929.99
Sources, Sites /wp-admin/admin.php?page=abwp_eym_view_sources_sites8172.3527.5521.41
Traffic /wp-admin/admin.php?page=abwp_eym8542.5227.6124.81
Sources, Summary /wp-admin/admin.php?page=abwp_eym_view_sources_summary8202.3627.2721.42
Sources, Social Network /wp-admin/admin.php?page=abwp_eym_view_sources_social8172.2227.5224.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • abwp_eym_plugin_version
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/easy-yandex-metrica/includes/page-admin-metrica-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/easy-yandex-metrica/includes/page-admin-metrica-view-data-dashboard.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/easy-yandex-metrica/includes/page-admin-metrica-view-data.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/easy-yandex-metrica/includes/page-admin-metrica-view-data-sources.php:4
    • > PHP Notice
      Undefined variable: page_title in wp-content/plugins/easy-yandex-metrica/includes/page-admin-metrica-view-data-sources.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/easy-yandex-metrica/includes/page-admin-metrica-error.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: yandex, yandex metrika, tools, admin, statistics...

easy-yandex-metrica/easy-yandex-metrica.php Passed 13 tests

The entry point to "Easy Yandex Metrica" version 1.2.2 is a PHP file that has certain tags in its header comment area
74 characters long description:
Easily add statistics display Yandex.Metrica to the Wordpress admin panel.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,124 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP88391978
PO File15473127
Markdown17018
JavaScript1061

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity38.67
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods2571.43%
▷ Protected methods00.00%
▷ Private methods1028.57%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin