78% dl-leadback

Code Review | DL Leadback

WordPress plugin DL Leadback scored78%from 54 tests.

About plugin

  • Plugin page: dl-leadback
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.6
  • WordPress version: 6.3.1
  • First release: Sep 20, 2016
  • Latest release: Sep 27, 2016
  • Number of updates: 13
  • Update frequency: every 0.5 days
  • Top authors: dyadyalesha (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /3,262 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.63ms] Passed 4 tests

Server-side resources used by DL Leadback
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.11 ▼5.18
Dashboard /wp-admin3.33 ▼0.0147.53 ▼19.76
Posts /wp-admin/edit.php3.38 ▲0.0347.25 ▼3.23
Add New Post /wp-admin/post-new.php5.91 ▲0.0395.75 ▼10.35
Media Library /wp-admin/upload.php3.25 ▲0.0334.09 ▼1.31
DL Leadback /wp-admin/admin.php?page=dl_leadback_stat3.22380.17
Настройки /wp-admin/admin.php?page=dl_leadback_calls3.2430.79

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

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

Browser metrics Passed 4 tests

DL Leadback: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.23 ▼1.071.57 ▼0.2737.72 ▼6.60
Dashboard /wp-admin2,233 ▲455.85 ▲0.89107.26 ▼9.0743.97 ▼2.51
Posts /wp-admin/edit.php2,119 ▲302.01 ▲0.0238.57 ▼0.8736.39 ▲4.08
Add New Post /wp-admin/post-new.php1,564 ▲5018.36 ▲0.82624.62 ▼49.2251.23 ▼3.79
Media Library /wp-admin/upload.php1,412 ▲244.23 ▲0.0595.91 ▼15.6542.64 ▼5.61
DL Leadback /wp-admin/admin.php?page=dl_leadback_stat9002.1823.7241.56
Настройки /wp-admin/admin.php?page=dl_leadback_calls7722.0324.5425.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=dl_leadback_stat
    • > Warning in wp-content/plugins/dl-leadback/page-options.php+56
    Use of undefined constant data - assumed 'data' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=dl_leadback_stat
    • > Warning in wp-content/plugins/dl-leadback/page-options.php+56
    Use of undefined constant widget_key - assumed 'widget_key' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=dl_leadback_stat
    • > Notice in wp-content/plugins/dl-leadback/page-options.php+56
    Undefined index: data
    • > GET request to /wp-admin/admin.php?page=dl_leadback_stat
    • > Notice in wp-content/plugins/dl-leadback/page-options.php+56
    Undefined variable: key
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dl_leadback_stat
    • > Notice in wp-content/plugins/dl-leadback/page-options.php+56
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=dl_leadback_calls
    • > Notice in wp-content/plugins/dl-leadback/page-calls.php+7
    Undefined index: date_from
    • > GET request to /wp-admin/admin.php?page=dl_leadback_calls
    • > Notice in wp-content/plugins/dl-leadback/page-calls.php+22
    Undefined index: order
    • > GET request to /wp-admin/admin.php?page=dl_leadback_calls
    • > Warning in wp-content/plugins/dl-leadback/page-calls.php+51
    Use of undefined constant error_message - assumed 'error_message' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dl-leadback/page-referals.php:9
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/dl-leadback/page-stat.php on line 164
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dl-leadback/page-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dl-leadback/page-calls.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dl-leadback/dl-leadback.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Страница Звонки), #2 (Страница Клиенты), #3 (Страница Настройки)
The official readme.txt is a good inspiration

dl-leadback/dl-leadback.php 92% from 13 tests

The main PHP script in "DL Leadback" version 1.2.1 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 261 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected558 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP517711558

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.68MB with 0.43MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png194.15KB69.70KB▼ 64.10%
screenshot-3.png267.76KB89.88KB▼ 66.43%
screenshot-2.png231.25KB91.37KB▼ 60.49%