78% block-for-yandex-sovetnik

Code Review | Blocking for Yandex.Advisor

WordPress plugin Blocking for Yandex.Advisor scored78%from 54 tests.

About plugin

  • Plugin page: block-for-yandex-...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Nov 24, 2020
  • Latest release: Mar 30, 2021
  • Number of updates: 14
  • Update frequency: every 9.0 days
  • Top authors: antisovet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼12.96ms] Passed 4 tests

A check of server-side resources used by Blocking for Yandex.Advisor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.72 ▼3.06
Dashboard /wp-admin3.23 ▼0.0736.16 ▼16.36
Posts /wp-admin/edit.php3.30 ▼0.0638.80 ▼9.34
Add New Post /wp-admin/post-new.php5.47 ▼0.4174.47 ▼23.08
Media Library /wp-admin/upload.php3.24 ▲0.0132.15 ▼2.19

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
antisovet_domain
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Blocking for Yandex.Advisor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲11513.74 ▼0.645.71 ▲3.9341.96 ▼2.45
Dashboard /wp-admin2,226 ▲355.87 ▲0.96139.92 ▲25.8584.47 ▲37.84
Posts /wp-admin/edit.php2,123 ▲342.03 ▲0.0337.59 ▼1.6332.79 ▼1.50
Add New Post /wp-admin/post-new.php1,542 ▲2323.08 ▼0.19723.85 ▲50.9055.44 ▼5.24
Media Library /wp-admin/upload.php1,417 ▲264.22 ▲0.05105.53 ▼2.0982.84 ▲31.54

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • antisovet_domain
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/block-for-yandex-sovetnik/antisovet.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/block-for-yandex-sovetnik/templates/info.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/block-for-yandex-sovetnik/templates/error.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/block-for-yandex-sovetnik/templates/register.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/block-for-yandex-sovetnik/templates/support.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: yandex, blocking, yandex sovetnik, advisor, hide...

block-for-yandex-sovetnik/antisovet.php 85% from 13 tests

The main PHP file in "Blocking for Yandex.Advisor" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("block-for-yandex-sovetnik.php" instead of "antisovet.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected284 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP53312201
PO File119552
CSS10018
SVG10013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods233.33%
▷ Protected methods00.00%
▷ Private methods466.67%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png0.72KB0.83KB0.00%