78% lead2team

Code Review | Lead2Team

WordPress plugin Lead2Team scored 78% from 54 tests.

About plugin

  • Plugin page: lead2team
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Oct 26, 2022
  • Latest release: Sep 15, 2023
  • Number of updates: 6
  • Update frequency: every 54.0 days
  • Top authors: lead2team (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 414 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.35ms] Passed 4 tests

This is a short check of server-side resources used by Lead2Team
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.77 ▲1.98
Dashboard /wp-admin3.33 ▲0.0343.37 ▼5.17
Posts /wp-admin/edit.php3.38 ▲0.0348.42 ▲3.64
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.42 ▼6.02
Media Library /wp-admin/upload.php3.25 ▲0.0335.57 ▼0.18
Lead2team /wp-admin/tools.php?page=lead2team-dashboard3.2932.20

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Lead2Team
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.21 ▼1.371.67 ▼0.2439.30 ▼4.16
Dashboard /wp-admin2,218 ▲275.90 ▼0.01109.48 ▼2.2541.34 ▲2.18
Posts /wp-admin/edit.php2,104 ▲152.08 ▲0.0241.29 ▲7.7835.62 ▲2.59
Add New Post /wp-admin/post-new.php6,870 ▲5,33522.34 ▼0.60995.21 ▲340.0363.22 ▼6.85
Media Library /wp-admin/upload.php1,403 ▲124.26 ▼0.0397.33 ▲3.3541.76 ▲1.56
Lead2team /wp-admin/tools.php?page=lead2team-dashboard1,0812.0638.9230.92

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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× PHP files output text when accessed directly:
    • > /wp-content/plugins/lead2team/public/partials/lead2team-public-display.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/lead2team/admin/partials/lead2team-admin-display.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Lead2team' not found in wp-content/plugins/lead2team/admin/partials/lead2team-admin-post-metabox.php:458
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lead2team/admin/class-lead2team-admin.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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 your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

lead2team/lead2team.php Passed 13 tests

Analyzing the main PHP file in "Lead2Team" version 2.0.0
104 characters long description:
Lead2Team's official WordPress plugin allows you to quickly install our widget on any WordPress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected3,440 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3131751,530
PHP132666151,033
CSS38142799
PO File1294573
SVG1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity22.88
▷ Minimum class complexity1.00
▷ Maximum class complexity90.00
Average method complexity4.98
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods44
▷ Static methods24.55%
▷ Public methods3988.64%
▷ Protected methods00.00%
▷ Private methods511.36%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 1.24MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png413.33KB179.61KB▼ 56.54%
admin/css/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/icon-128x128.png9.67KB5.42KB▼ 43.93%
admin/images/Lead2Team-logo.png2.43KB2.57KB0.00%
assets/screenshot-1.png130.80KB39.46KB▼ 69.83%