78% sberlead

Code Review | СберЛид

WordPress plugin СберЛид scored 78% from 54 tests.

About plugin

  • Plugin page: sberlead
  • Plugin version: 2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 12, 2021
  • Latest release: Aug 24, 2022
  • Number of updates: 32
  • Update frequency: every 11.8 days
  • Top authors: denisdenisow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 1,837 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.99ms] Passed 4 tests

Analyzing server-side resources used by СберЛид
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.95 ▼3.88
Dashboard /wp-admin3.35 ▲0.0446.24 ▲0.88
Posts /wp-admin/edit.php3.40 ▲0.0444.41 ▼5.53
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.84 ▼15.42
Media Library /wp-admin/upload.php3.27 ▲0.0438.25 ▲1.56
СберЛид /wp-admin/options-general.php?page=sberlead/setting.php3.2131.24

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

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

Browser metrics Passed 4 tests

Checking browser requirements for СберЛид
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.61 ▼0.761.58 ▼0.2540.96 ▼3.84
Dashboard /wp-admin2,213 ▲254.87 ▲0.01102.37 ▼7.2341.93 ▲1.59
Posts /wp-admin/edit.php2,090 ▲11.98 ▼0.0334.34 ▼7.9533.02 ▼0.93
Add New Post /wp-admin/post-new.php1,540 ▲1723.29 ▲0.07624.69 ▼28.5450.74 ▼11.11
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0896.61 ▼14.5942.55 ▼4.35
СберЛид /wp-admin/options-general.php?page=sberlead/setting.php7792.1823.7028.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=sberlead/setting.php
    • > Notice in wp-content/plugins/sberlead/admin_panel.php+104
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sberlead/sberlead.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

sberlead/sberlead.php Passed 13 tests

The entry point to "СберЛид" version 2.0 is a PHP file that has certain tags in its header comment area
61 characters long description:
Добавление на сайт кода "СберЛид".

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin161 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23132161

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity16.00
▷ Minimum class complexity6.00
▷ Maximum class complexity26.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected