93% antoniolite-yandex-metrica-json-ld-schema

Code Review | JSON-LD Schema for Yandex Metrica

WordPress plugin JSON-LD Schema for Yandex Metrica scored 93% from 54 tests.

About plugin

  • Plugin page: antoniolite-yande...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 5.8.1
  • First release: Jun 26, 2020
  • Latest release: Aug 1, 2020
  • Number of updates: 3
  • Update frequency: every 12.3 days
  • Top authors: antoniolite (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 248 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼147.29ms] Passed 4 tests

Analyzing server-side resources used by JSON-LD Schema for Yandex Metrica
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.49 ▲9.94
Dashboard /wp-admin3.07 ▲0.0152.45 ▼1.16
Posts /wp-admin/edit.php3.12 ▲0.0145.60 ▼8.71
Add New Post /wp-admin/post-new.php5.42 ▼0.01101.56 ▼576.58
Media Library /wp-admin/upload.php3.01 ▲0.0138.11 ▼2.71
JSON-LD Schema for Yandex Metrica /wp-admin/options-general.php?page=ymschema-settings-page2.9835.90

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

JSON-LD Schema for Yandex Metrica: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,707 ▲13516.27 ▲0.6810.67 ▼0.6549.47 ▼1.11
Dashboard /wp-admin2,972 ▲415.91 ▼0.13151.33 ▼12.77132.48 ▲0.82
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0177.68 ▲2.9298.31 ▼4.17
Add New Post /wp-admin/post-new.php1,607 ▼7618.62 ▲1.40385.90 ▼35.22119.76 ▲2.25
Media Library /wp-admin/upload.php1,812 ▲55.02 ▼0.02166.59 ▲9.10126.04 ▼2.52
JSON-LD Schema for Yandex Metrica /wp-admin/options-general.php?page=ymschema-settings-page1,1072.0966.7097.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

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
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/antoniolite-yandex-metrica-json-ld-schema/yandex-metrica-json-ld-schema.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: yandex metrica, metrica, analytics, content reports, yandex...

antoniolite-yandex-metrica-json-ld-schema/yandex-metrica-json-ld-schema.php 77% from 13 tests

The entry point to "JSON-LD Schema for Yandex Metrica" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("antoniolite-yandex-metrica-json-ld-schema.php" instead of "yandex-metrica-json-ld-schema.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected251 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions583.33%
▷ Anonymous functions116.67%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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