83% leadconnector

Code Review | LeadConnector

WordPress plugin LeadConnector scored83%from 54 tests.

About plugin

  • Plugin page: leadconnector
  • Plugin version: 1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 8, 2020
  • Latest release: Jul 3, 2023
  • Number of updates: 34
  • Update frequency: every 27.6 days
  • Top authors: varunvairavanlc (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20,000+ active /51,860 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.22MB] [CPU: ▼0.48ms] Passed 4 tests

Analyzing server-side resources used by LeadConnector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2341.37 ▼0.59
Dashboard /wp-admin3.53 ▲0.2247.65 ▼5.17
Posts /wp-admin/edit.php3.64 ▲0.2846.90 ▼0.28
Add New Post /wp-admin/post-new.php6.11 ▲0.2395.01 ▲4.14
Media Library /wp-admin/upload.php3.45 ▲0.2236.98 ▲5.02

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for LeadConnector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.28 ▼1.471.70 ▼0.1147.33 ▲3.82
Dashboard /wp-admin2,220 ▲325.78 ▲0.9097.78 ▼20.3239.18 ▼7.25
Posts /wp-admin/edit.php2,103 ▲142.03 ▲0.0239.74 ▲3.0834.42 ▲1.91
Add New Post /wp-admin/post-new.php1,549 ▲1618.57 ▼4.72651.28 ▼2.7460.06 ▲0.36
Media Library /wp-admin/upload.php1,402 ▲114.23 ▲0.0499.69 ▲4.0940.62 ▼1.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/leadconnector/public/partials/lc-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

leadconnector/LeadConnector.php 85% from 13 tests

The main PHP file in "LeadConnector" ver. 1.7 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("leadconnector.php" instead of "LeadConnector.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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 detected40,148 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript68,5627,06138,968
PHP132385891,004
PO File34957165
CSS421511

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity21.29
▷ Minimum class complexity1.00
▷ Maximum class complexity132.00
Average method complexity5.18
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants525.00%
▷ Class constants1575.00%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon.png1.50KB1.15KB▼ 23.62%