89% tolstoy-comments

Code Review | Tolstoy Comments

WordPress plugin Tolstoy Comments scored 89% from 54 tests.

About plugin

  • Plugin page: tolstoy-comments
  • Plugin version: 2.3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 6.3.1
  • First release: Mar 21, 2019
  • Latest release: Jun 16, 2021
  • Number of updates: 18
  • Update frequency: every 46.2 days
  • Top authors: devlevr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,516 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.17MB] [CPU: ▼4.47ms] Passed 4 tests

Analyzing server-side resources used by Tolstoy Comments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1538.66 ▼2.26
Dashboard /wp-admin3.47 ▲0.1748.65 ▼0.93
Posts /wp-admin/edit.php3.58 ▲0.2348.65 ▼3.21
Add New Post /wp-admin/post-new.php6.07 ▲0.1891.61 ▼11.49
Media Library /wp-admin/upload.php3.39 ▲0.1638.78 ▲0.03
Settings /wp-admin/admin.php?page=tolstoycomments_settings3.3635.61
Tolstoy 0 /wp-admin/admin.php?page=tolstoycomments3.1725.17

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tolstoy Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲12313.24 ▼1.121.96 ▲0.3642.65 ▲0.41
Dashboard /wp-admin2,238 ▲524.90 ▼0.00116.48 ▲2.0838.79 ▲1.13
Posts /wp-admin/edit.php2,128 ▲392.08 ▲0.0742.71 ▲5.1531.12 ▼1.02
Add New Post /wp-admin/post-new.php1,550 ▲3018.21 ▼4.82635.87 ▲12.1268.01 ▲14.12
Media Library /wp-admin/upload.php1,424 ▲394.30 ▲0.07117.32 ▼12.3648.83 ▼1.19
Settings /wp-admin/admin.php?page=tolstoycomments_settings9721.7934.5333.09
Tolstoy 0 /wp-admin/admin.php?page=tolstoycomments5167.97297.1831.00

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Основной раздел чатов), #2 (Рейтинги пользователей), #3 (Награды за разные виды достижений), #4 (E-mail и Push-уведомления), #5 (В виджете есть возможность рекламной монетизации)
Please take inspiration from this readme.txt

tolstoy-comments/tolstoycomments.php 85% from 13 tests

The entry point to "Tolstoy Comments" version 2.3.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tolstoy-comments.php" instead of "tolstoycomments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected815 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10147131608
PO File25664184
JavaScript16023

PHP code Passed 2 tests

A short 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.28
Average class complexity10.00
▷ Minimum class complexity2.00
▷ Maximum class complexity16.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods33
▷ Static methods2060.61%
▷ Public methods2987.88%
▷ Protected methods00.00%
▷ Private methods412.12%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin