89% leadelephant

Code Review | LeadElephant for Wordpress

WordPress plugin LeadElephant for Wordpress scored 89% from 54 tests.

About plugin

  • Plugin page: leadelephant
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.1.1
  • WordPress version: 5.8.1
  • First release: Apr 24, 2015
  • Latest release: Apr 24, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: leadelephant (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 627 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by LeadElephant for Wordpress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0136.51 ▲5.66
Dashboard /wp-admin3.08 ▲0.0135.75 ▼4.38
Posts /wp-admin/edit.php3.13 ▲0.0236.42 ▼0.96
Add New Post /wp-admin/post-new.php5.44 ▼0.0073.18 ▼587.38
Media Library /wp-admin/upload.php3.02 ▲0.0124.27 ▲0.34
LeadElephant /wp-admin/options-general.php?page=leadelephant-tracking-code2.9722.88

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by LeadElephant for Wordpress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲4515.89 ▲0.264.98 ▼0.4775.17 ▼2.19
Dashboard /wp-admin2,938 ▲456.00 ▼0.13114.35 ▼18.05166.20 ▼8.96
Posts /wp-admin/edit.php2,711 ▼263.24 ▲0.0164.46 ▼2.07137.84 ▼2.24
Add New Post /wp-admin/post-new.php3,709 ▼9818.95 ▲0.17415.22 ▼34.79165.35 ▼9.56
Media Library /wp-admin/upload.php1,757 ▲55.51 ▼0.04139.13 ▼4.90185.28 ▲2.58
LeadElephant /wp-admin/options-general.php?page=leadelephant-tracking-code1,1092.5458.01125.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=leadelephant-tracking-code
    • > Notice in wp-content/plugins/leadelephant/leadelephant.php+35
    Undefined variable: message
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=leadelephant-tracking-code
    • > Notice in wp-content/plugins/leadelephant/leadelephant.php+71
    Trying to access array offset on value of type bool
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=leadelephant-tracking-code
    • > Notice in wp-content/plugins/leadelephant/leadelephant.php+71
    Trying to access array offset on value of type null

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

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: leadelephant, code, leads, tracking, companies

leadelephant/leadelephant.php Passed 13 tests

"LeadElephant for Wordpress" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
54 characters long description:
Plugin for integrating LeadElephant into your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected65 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP123865

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin