84% easy-lead-generation

Code Review | 46+ Beautiful Widgets For Capturing Leads - Treck

WordPress plugin 46+ Beautiful Widgets For Capturing Leads - Treck scored84%from 54 tests.

About plugin

  • Plugin page: easy-lead-generation
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.4.2
  • WordPress version: 6.3.1
  • First release: Feb 20, 2020
  • Latest release: Jun 15, 2020
  • Number of updates: 12
  • Update frequency: every 9.7 days
  • Top authors: treck (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /502 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼7.52ms] Passed 4 tests

Analyzing server-side resources used by 46+ Beautiful Widgets For Capturing Leads - Treck
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.66 ▲4.32
Dashboard /wp-admin3.54 ▲0.2050.88 ▼7.88
Posts /wp-admin/edit.php3.59 ▲0.2449.38 ▼2.97
Add New Post /wp-admin/post-new.php6.04 ▲0.1588.14 ▼17.86
Media Library /wp-admin/upload.php3.38 ▲0.1535.33 ▼1.37
Treck /wp-admin/options-general.php?page=treck3.3738.68

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
treck_basics
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for 46+ Beautiful Widgets For Capturing Leads - Treck
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲21214.99 ▲0.621.84 ▲0.1042.74 ▲1.69
Dashboard /wp-admin2,361 ▲1706.61 ▲1.74142.22 ▲42.0942.16 ▼1.76
Posts /wp-admin/edit.php2,273 ▲1813.77 ▲1.7849.60 ▲10.1529.41 ▼6.67
Add New Post /wp-admin/post-new.php1,538 ▲1018.49 ▲0.27622.27 ▼31.7734.49 ▼34.07
Media Library /wp-admin/upload.php1,409 ▲184.40 ▲0.1979.54 ▼20.8740.87 ▼2.59
Treck /wp-admin/options-general.php?page=treck1,0153.5546.5625.10

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • treck_basics

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-lead-generation/vendor/tareq1988/wordpress-settings-api-class/example/procedural-example.php:270
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-lead-generation/src/class-treck-admin.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-lead-generation/vendor/tareq1988/wordpress-settings-api-class/src/class.settings-api.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #2 (This is the second screen shot) image not found
The official readme.txt is a good inspiration

easy-lead-generation/easy-lead-generation.php Passed 13 tests

"46+ Beautiful Widgets For Capturing Leads - Treck" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
108 characters long description:
Engage your website visitors with user-friendly popups, side-messages and notification bars, without coding.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,465 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP142754991,301
JSON30091
Markdown130073

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.00
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods85
▷ Static methods67.06%
▷ Public methods7790.59%
▷ Protected methods33.53%
▷ Private methods55.88%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.49MB with 0.27MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png20.77KB10.72KB▼ 48.39%
assets/screenshot1.png79.50KB29.83KB▼ 62.48%
assets/icon-128-128.png8.25KB4.55KB▼ 44.89%
vendor/tareq1988/wordpress-settings-api-class/screenshot-1.png389.59KB115.93KB▼ 70.24%