74% lead-champion-discover

Code Review | Lead Champion

WordPress plugin Lead Champion scored74%from 54 tests.

About plugin

  • Plugin page: lead-champion-dis...
  • Plugin version: 22.5.12.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0
  • WordPress version: 6.3.1
  • First release: Sep 21, 2016
  • Latest release: May 12, 2022
  • Number of updates: 92
  • Update frequency: every 22.4 days
  • Top authors: leadchampion (79.35%)lorenzonazario (21.74%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /4,087 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.95MB] [CPU: ▼36.63ms] Passed 4 tests

This is a short check of server-side resources used by Lead Champion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.41 ▼1.00
Dashboard /wp-admin2.99 ▼0.3125.48 ▼30.32
Posts /wp-admin/edit.php3.00 ▼0.3622.16 ▼24.23
Add New Post /wp-admin/post-new.php2.99 ▼2.8922.02 ▼78.28
Media Library /wp-admin/upload.php2.99 ▼0.2324.11 ▼13.69

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
lcd_site_id
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
cookieMode

Browser metrics Passed 4 tests

Lead Champion: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.37 ▲0.021.88 ▲0.2448.08 ▲3.16
Dashboard /wp-admin2,194 ▲145.56 ▼0.0497.27 ▼5.5266.80 ▲21.57
Posts /wp-admin/edit.php2,108 ▲51.99 ▲0.0534.23 ▼4.5633.88 ▼0.69
Add New Post /wp-admin/post-new.php1,536 ▲1023.87 ▲0.92702.07 ▲27.6957.42 ▲2.16
Media Library /wp-admin/upload.php1,414 ▲144.22 ▼0.18108.15 ▼4.6679.79 ▲31.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • cookieMode
    • widget_recent-posts
    • lcd_site_id

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/lead-champion-discover/wp_lcd.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

lead-champion-discover/wp_lcd.php 92% from 13 tests

"Lead Champion" version 22.5.12.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lead-champion-discover.php" instead of "wp_lcd.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin387 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP12236189
PO File24449123
Markdown121049
SVG10026
Bourne Shell1090

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.14MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/LeadChampionLogo-800x800.png35.78KB10.87KB▼ 69.62%
images/LeadChampionLogo-128x128.png9.83KB1.52KB▼ 84.56%
images/logoLCd.png47.94KB12.90KB▼ 73.09%
images/lcd_favicon.png5.95KB0.43KB▼ 92.85%
images/LeadChampionLogoName.png28.44KB8.26KB▼ 70.96%