68% sunnylandingpages

Code Review | Lead Gen Landing Page

WordPress plugin Lead Gen Landing Page scored68%from 54 tests.

About plugin

  • Plugin page: sunnylandingpages
  • Plugin version: 4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.2
  • WordPress version: 6.3.1
  • First release: Aug 5, 2016
  • Latest release: May 16, 2023
  • Number of updates: 182
  • Update frequency: every 13.6 days
  • Top authors: sidmittal (54.4%)vineetkharwar (46.15%)

Code review

54 tests

User reviews

33 reviews

Install metrics

300+ active /44,389 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.63MB] [CPU: ▼16.85ms] Passed 4 tests

This is a short check of server-side resources used by Lead Gen Landing Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.87 ▼2.76
Dashboard /wp-admin3.35 ▲0.0544.98 ▼8.11
Posts /wp-admin/edit.php3.40 ▲0.0549.41 ▲3.19
Add New Post /wp-admin/post-new.php3.22 ▼2.6736.58 ▼56.58
Media Library /wp-admin/upload.php3.27 ▲0.0535.33 ▲0.04
Page Lead data /wp-admin/edit.php?post_type=funlhtmllandingpages&page=funlleadform3.2532.07
Landing Page /wp-admin/edit.php?post_type=funlhtmllandingpages3.3240.07
Add New /wp-admin/post-new.php?post_type=funlhtmllandingpages3.3242.32

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: 2 new tables, 6 new options
New tables
wp_funl_forms
wp_funlhtmllandingpages_pages
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Lead Gen Landing Page: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲11715.79 ▲1.401.70 ▼0.7443.75 ▼21.45
Dashboard /wp-admin2,255 ▲646.84 ▲0.93152.87 ▲52.8563.70 ▲22.94
Posts /wp-admin/edit.php2,147 ▲584.04 ▲2.0587.87 ▲52.0433.21 ▲0.62
Add New Post /wp-admin/post-new.php1,559 ▲2224.74 ▲1.65721.07 ▲59.9236.06 ▼25.55
Media Library /wp-admin/upload.php1,442 ▲605.79 ▲1.57130.29 ▲25.5171.28 ▲25.30
Page Lead data /wp-admin/edit.php?post_type=funlhtmllandingpages&page=funlleadform9703.7175.0725.21
Landing Page /wp-admin/edit.php?post_type=funlhtmllandingpages1,1463.9446.2165.16
Add New /wp-admin/post-new.php?post_type=funlhtmllandingpages2,2855.2386.0678.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_funl_forms
    • wp_funlhtmllandingpages_pages
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sunnylandingpages/includes/api/class-funl-data-api.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/sunnylandingpages/admin/pages/single-funlhtmllandingpages.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/sunnylandingpages/includes/lead/class-funl-lead-form.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=funlhtmllandingpages
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=funlhtmllandingpages 105:22 Uncaught TypeError: Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node'.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
Please take inspiration from this readme.txt

sunnylandingpages/funl-html-landing-pages.php 85% from 13 tests

"Lead Gen Landing Page" version 4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sunnylandingpages.php" instead of "funl-html-landing-pages.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
No dangerous file extensions were detected789 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11251559787
CSS1042

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods3888.37%
▷ Protected methods00.00%
▷ Private methods511.63%
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

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/funl-icon-blue.png0.38KB0.50KB0.00%
includes/img/folder.png7.45KB4.76KB▼ 36.08%
admin/assets/img/funl-icon-white.png0.34KB0.46KB0.00%