84% mihdan-yandex-dialogs

Code Review | Mihdan: Dialogs For Yandex

WordPress plugin Mihdan: Dialogs For Yandex scored84%from 54 tests.

About plugin

  • Plugin page: mihdan-yandex-dia...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.5
  • WordPress version: 6.3.1
  • First release: Aug 28, 2019
  • Latest release: Jun 30, 2020
  • Number of updates: 6
  • Update frequency: every 51.2 days
  • Top authors: mihdan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,067 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.16MB] [CPU: ▲1.28ms] Passed 4 tests

This is a short check of server-side resources used by Mihdan: Dialogs For Yandex
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.48 ▲0.96
Dashboard /wp-admin3.54 ▲0.2349.37 ▲0.41
Posts /wp-admin/edit.php3.59 ▲0.2350.74 ▲3.83
Add New Post /wp-admin/post-new.php6.03 ▲0.1492.41 ▲7.78
Media Library /wp-admin/upload.php3.37 ▲0.1435.74 ▼0.08
Yandex Dialogs /wp-admin/options-general.php?page=mihdan_yandex_dialogs_settings3.3734.24

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
mihdan_yandex_dialog_basic
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Mihdan: Dialogs For Yandex: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,130 ▲39515.30 ▲0.9515.41 ▲13.6947.23 ▲2.88
Dashboard /wp-admin2,362 ▲1746.61 ▲1.73137.76 ▲26.9545.89 ▼0.44
Posts /wp-admin/edit.php2,271 ▲1793.52 ▲1.5556.36 ▲14.1835.48 ▼2.29
Add New Post /wp-admin/post-new.php1,527 ▲1023.36 ▲5.70710.60 ▲65.1440.12 ▼18.52
Media Library /wp-admin/upload.php1,401 ▲134.34 ▲0.1281.90 ▼25.4042.13 ▼1.09
Yandex Dialogs /wp-admin/options-general.php?page=mihdan_yandex_dialogs_settings1,1153.5349.3333.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • mihdan_yandex_dialog_basic
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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
Everything seems fine, however 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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'MIHDAN_YANDEX_DIALOGS_DIR/includes/class-osa.php' (include_path='.:/usr/share/php') in wp-content/plugins/mihdan-yandex-dialogs/includes/class-main.php on line 40
    • > PHP Warning
      require_once(MIHDAN_YANDEX_DIALOGS_DIR/includes/class-osa.php): failed to open stream: No such file or directory in wp-content/plugins/mihdan-yandex-dialogs/includes/class-main.php on line 40
    • > PHP Warning
      Use of undefined constant MIHDAN_YANDEX_DIALOGS_DIR - assumed 'MIHDAN_YANDEX_DIALOGS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/mihdan-yandex-dialogs/includes/class-main.php on line 40

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% 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: widget, dialogs, yandex, mihdan

mihdan-yandex-dialogs/mihdan-yandex-dialogs.php 92% from 13 tests

The main PHP script in "Mihdan: Dialogs For Yandex" version 1.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 245 characters long)

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
There were no executable files found in this plugin647 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP545396647

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.00
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods44
▷ Static methods12.27%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected