66% logic-pro

Code Review | Visitor Logic Lite

WordPress plugin Visitor Logic Lite scored66%from 54 tests.

About plugin

  • Plugin page: logic-pro
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Mar 11, 2015
  • Latest release: Dec 24, 2015
  • Number of updates: 19
  • Update frequency: every 15.2 days
  • Top authors: rodgerholl (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,829 total downloads

Benchmarks

Plugin footprint 83% 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.33MB] [CPU: ▼14.67ms] Passed 4 tests

Server-side resources used by Visitor Logic Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3938.40 ▼7.33
Dashboard /wp-admin3.70 ▲0.3946.61 ▼3.52
Posts /wp-admin/edit.php3.75 ▲0.3949.32 ▲0.29
Add New Post /wp-admin/post-new.php3.48 ▼2.4134.57 ▼48.11
Media Library /wp-admin/upload.php3.56 ▲0.3242.09 ▲7.76
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=logicblock3.5534.54
All Logic Blocks /wp-admin/edit.php?post_type=logicblock3.6038.46
Add New Logic Block /wp-admin/post-new.php?post_type=logicblock3.4732.69
Options /wp-admin/edit.php?post_type=logicblock&page=logic-pro/logic-lite.php3.5335.16

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_lp_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Visitor Logic Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12413.49 ▼1.191.65 ▼0.2442.01 ▼4.35
Dashboard /wp-admin2,258 ▲705.10 ▼0.76118.04 ▼0.5476.80 ▲27.11
Posts /wp-admin/edit.php2,148 ▲592.36 ▲0.3742.00 ▲6.1834.27 ▼4.30
Add New Post /wp-admin/post-new.php1,723 ▲19024.95 ▲1.62708.36 ▲10.2535.66 ▼20.50
Media Library /wp-admin/upload.php1,447 ▲624.59 ▲0.34118.53 ▲17.6846.48 ▲3.96
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=logicblock1,3692.2031.9634.30
All Logic Blocks /wp-admin/edit.php?post_type=logicblock1,1492.3137.9832.97
Add New Logic Block /wp-admin/post-new.php?post_type=logicblock3,2428.10186.02183.68
Options /wp-admin/edit.php?post_type=logicblock&page=logic-pro/logic-lite.php9172.0932.4029.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_lp_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=logicblock
    • > Notice in wp-content/plugins/logic-pro/inc/lp_core.php+25
    Undefined index: lp_hidden
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=logicblock
    • > Notice in wp-includes/general-template.php+5153
    Array to string conversion
    • > GET request to /wp-admin/post-new.php?post_type=logicblock
    • > Notice in wp-content/plugins/logic-pro/inc/modules/lp_cookie.php+35
    Undefined index: lp_view_posts

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 take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/logic-pro/images/lpt.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_PageDropdown' not found in wp-content/plugins/logic-pro/inc/lp_functions.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/logic-pro/inc/lp_vc_maps.php:2
    • > PHP Notice
      Undefined index: o in wp-content/plugins/logic-pro/images/lpt.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/logic-pro/inc/lp_widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/logic-pro/logic-lite.php:11
    • > PHP Notice
      Undefined index: s in wp-content/plugins/logic-pro/images/lpt.php on line 75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/logic-pro/inc/lp_options.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/logic-pro/inc/lp_core.php:12
    • > PHP Notice
      Undefined index: r in wp-content/plugins/logic-pro/images/lpt.php on line 22

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=logicblock&page=logic-pro/logic-lite.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/logic-pro/js/logic-lite.js:70:37)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=logicblock&page=logic-pro/logic-lite.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/logic-pro/js/logic-lite.js:84:39)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=logicblock&page=logic-pro/logic-lite.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/logic-pro/js/logic-lite.js:94:39)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=logicblock&page=logic-pro/logic-lite.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

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
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === logic-pro === )
Please take inspiration from this readme.txt

logic-pro/logic-lite.php 85% from 13 tests

The main file in "Visitor Logic Lite" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 268 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("logic-pro.php" instead of "logic-lite.php")

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
Everything looks great! No dangerous files found in this plugin4,171 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP17339982,008
JavaScript22243001,829
CSS1289334

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity13.79
▷ Minimum class complexity2.00
▷ Maximum class complexity33.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
20 PNG files occupy 0.25MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/mailchimp.png12.12KB3.40KB▼ 71.97%
images/wishlist.png18.86KB6.92KB▼ 63.27%
images/cookie-icon.png1.38KB1.12KB▼ 18.56%
images/Visitor-Logic-Pro-300.png11.22KB4.62KB▼ 58.85%
images/aweber.png56.74KB19.56KB▼ 65.53%