62% stealthlead

Code Review | Stealthlead

WordPress plugin Stealthlead scored62%from 54 tests.

About plugin

  • Plugin page: stealthlead
  • Plugin version: 1.0.2.8.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2015
  • Latest release: Oct 9, 2015
  • Number of updates: 24
  • Update frequency: every 0.8 days
  • Top authors: tomtan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /702 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 gracefully, with no errors

Server metrics [RAM: ▲0.29MB] [CPU: ▼5.41ms] Passed 4 tests

A check of server-side resources used by Stealthlead
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2335.15 ▼3.29
Dashboard /wp-admin3.60 ▲0.2943.80 ▼7.45
Posts /wp-admin/edit.php3.71 ▲0.3548.98 ▲0.55
Add New Post /wp-admin/post-new.php6.31 ▲0.4276.65 ▼10.61
Media Library /wp-admin/upload.php3.54 ▲0.3134.20 ▼0.30
Settings /wp-admin/admin.php?page=stealthlead_account_config3.4330.45
Advance - Add Offer /wp-admin/admin.php?page=stealthlead_offers_add_offer3.5934.52
Advance - Offers /wp-admin/admin.php?page=stealthlead_offers_admin3.5031.58

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 47 new files
Database: 1 new table, 21 new options
New tables
wp_stealthlead_offers
New WordPress options
widget_recent-posts
stealthleadLastValidTotp
widget_theysaidso_widget
stealthleadMinuteLimit
stealthleadMinuteCount
widget_recent-comments
theysaidso_admin_options
stealthleadKey
stealthleadEnabled
can_compress_scripts
...

Browser metrics Passed 4 tests

Checking browser requirements for Stealthlead
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,954 ▲18313.75 ▼0.655.27 ▲3.3138.20 ▼5.79
Dashboard /wp-admin2,256 ▲655.04 ▼0.86112.05 ▲4.6142.34 ▲0.48
Posts /wp-admin/edit.php2,139 ▲502.12 ▲0.0940.87 ▲3.8139.30 ▲2.05
Add New Post /wp-admin/post-new.php1,556 ▲4223.50 ▲5.84670.33 ▼41.4554.13 ▼2.61
Media Library /wp-admin/upload.php1,432 ▲444.27 ▲0.0497.55 ▼12.8241.93 ▼6.27
Settings /wp-admin/admin.php?page=stealthlead_account_config1,0281.8124.7729.99
Advance - Add Offer /wp-admin/admin.php?page=stealthlead_offers_add_offer1,7106.75143.6660.95
Advance - Offers /wp-admin/admin.php?page=stealthlead_offers_admin9741.7925.0226.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_stealthlead_offers
  • The uninstall procedure has failed, leaving 21 options in the database
    • stealthleadUserId
    • stealthleadJsScript
    • stealthleadMinuteLimit
    • stealthleadEnabled
    • db_upgraded
    • widget_recent-comments
    • stealthleadWebsiteUrl
    • stealthleadKey
    • stealthleadMinuteCount
    • error
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=stealthlead_account_config
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
  • 40 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stealthlead_account_config
    • > Deprecated in wp-content/plugins/stealthlead/JSON.php+726
    Array and string offset access syntax with curly braces is deprecated
    • > GET request to /wp-admin/admin.php?page=stealthlead_account_config
    • > Deprecated in wp-content/plugins/stealthlead/JSON.php+116
    Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stealthlead_account_config
    • > Deprecated in wp-content/plugins/stealthlead/JSON.php+796
    Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON_Error has a deprecated constructor

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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/stealthlead/hotp.php
  • 5× 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/stealthlead/stealthlead_offers.php:557
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_currentuserinfo() in wp-content/plugins/stealthlead/stealthlead_offers_new_offers.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/stealthlead/stealthlead_offers_admin.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stealthlead/stealthlead_offers.php:557
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_editor() in wp-content/plugins/stealthlead/stealthlead_offers_manage_offer.php:166

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid url: ""
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

stealthlead/stealthlead.php 92% from 13 tests

"Stealthlead" version 1.0.2.8.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,580 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP85656792,078
CSS33157424
JavaScript27078

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.37
Average class complexity25.80
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity7.20
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods20
▷ Static methods420.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions52
▷ Named functions52100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.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
28 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%