66% leadmonster

Code Review | LeadMonster

WordPress plugin LeadMonster scored66%from 54 tests.

About plugin

  • Plugin page: leadmonster
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.6.1
  • WordPress version: 6.3.1
  • First release: Dec 16, 2020
  • Latest release: Feb 5, 2021
  • Number of updates: 4
  • Update frequency: every 13.0 days
  • Top authors: lasertraffic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /486 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.76MB] [CPU: ▼24.83ms] Passed 4 tests

An overview of server-side resources used by LeadMonster
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.35 ▼0.60
Dashboard /wp-admin3.11 ▼0.2029.21 ▼23.68
Posts /wp-admin/edit.php3.24 ▼0.1132.15 ▼15.35
Add New Post /wp-admin/post-new.php3.19 ▼2.7034.25 ▼59.69
Media Library /wp-admin/upload.php3.19 ▼0.0431.41 ▼0.29
Settings /wp-admin/edit.php?post_type=leadmonster&page=cf_api3.3129.70
Shortcodes /wp-admin/edit.php?post_type=leadmonster&page=leadmonster_shortcodes3.3431.51
Add New /wp-admin/post-new.php?post_type=leadmonster3.1430.32
Pages /wp-admin/edit.php?post_type=leadmonster3.3231.11

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
leadmonster_posts_schema_version
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
leadmonster_display_method
widget_leadmonster_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for LeadMonster
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲13114.74 ▲0.352.06 ▲0.2446.34 ▼4.10
Dashboard /wp-admin2,228 ▲375.83 ▲0.9595.39 ▼5.1177.95 ▲35.36
Posts /wp-admin/edit.php2,120 ▲311.99 ▼0.0134.05 ▼5.0634.57 ▼0.31
Add New Post /wp-admin/post-new.php1,697 ▲15522.56 ▼0.74678.38 ▲5.9555.90 ▼1.05
Media Library /wp-admin/upload.php1,425 ▲404.20 ▼0.0594.78 ▲0.9774.64 ▲31.45
Settings /wp-admin/edit.php?post_type=leadmonster&page=cf_api1,0002.1028.4981.94
Shortcodes /wp-admin/edit.php?post_type=leadmonster&page=leadmonster_shortcodes1,2932.1228.3845.81
Add New /wp-admin/post-new.php?post_type=leadmonster1,0762.3349.2651.80
Pages /wp-admin/edit.php?post_type=leadmonster1,1082.0436.1021.52

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
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • leadmonster_posts_schema_version
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_leadmonster_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=leadmonster&page=leadmonster_shortcodes
    • > Notice in wp-content/plugins/leadmonster/pages/shortcodes.php+290
    Undefined index: error
    • > GET request to /wp-admin/post-new.php?post_type=leadmonster
    • > Notice in wp-content/plugins/leadmonster/leadmonster.php+151
    Undefined index: post_type
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=leadmonster
    • > Notice in wp-content/plugins/leadmonster/pages/edit.php+12
    Undefined index: post

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
Please fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/leadmonster/pages/settings.php
    • > /wp-content/plugins/leadmonster/pages/edit.php
    • > /wp-content/plugins/leadmonster/pages/shortcodes.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_count_posts() in wp-content/plugins/leadmonster/pages/reset_data.php:6

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=leadmonster&page=cf_api
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=leadmonster&page=cf_api - Access to XMLHttpRequest at 'https://api.clickfunnels.com/funnels/list?email=&auth_token=' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/edit.php?post_type=leadmonster&page=cf_api
    • > Network (severe)
    https://api.clickfunnels.com/funnels/list?email=&auth_token= - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/edit.php?post_type=leadmonster&page=leadmonster_shortcodes
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=leadmonster&page=leadmonster_shortcodes - Access to XMLHttpRequest at 'https://api.clickfunnels.com/funnels/list.json?email=&auth_token=' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=leadmonster
    • > Network (severe)
    https://api.clickfunnels.com/funnels/list.json?email=&auth_token= - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/post-new.php?post_type=leadmonster
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=leadmonster - Access to XMLHttpRequest at 'https://api.clickfunnels.com/funnels/list.json?email=&auth_token=' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (LeadMonster is the ultimate growth hacking toolkit to grow your business leads and sales in WordPress), #2 (The logo for LeadMonster), #3 (Display the current pages configured with LeadMonster), #4 (Use the Page Settings to specify a Funnel Name and Step to associate with a WordPress URL), #5 (The Settings API Connection page lets you connect to your ClickFunnels account), #6 (The Settings Compatibility Check page lets you test your connection), #7 (The Settings General page lets you select whether the page is embedded in WordPress or redirected), #8 (Use Short Codes to embed pages), #9 (Use Short Codes to add a ClickPop), #10 (Use Short Codes to add a ClickForm)
  • Tags: You are using too many tags: 23 tag instead of maximum 10
Please take inspiration from this readme.txt

leadmonster/leadmonster.php 92% from 13 tests

The entry point to "LeadMonster" version 1.1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 311 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,414 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP6133531,521
Sass11210666
CSS212127643
SVG100565
JavaScript12019

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity23.50
▷ Minimum class complexity7.00
▷ Maximum class complexity40.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/house3.png0.46KB0.46KB0.00%
images/logo.png6.71KB3.19KB▼ 52.52%
images/attention_1.png0.34KB0.34KB0.00%
images/icon.png0.76KB0.80KB0.00%
images/icon-32.png2.35KB1.57KB▼ 33.06%