56% wp-triggers-lite

Code Review | WP Triggers Lite

WordPress plugin WP Triggers Lite scored 56% from 54 tests.

About plugin

  • Plugin page: wp-triggers-lite
  • Plugin version: 2.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.8
  • WordPress version: 6.3.1
  • First release: Jan 15, 2014
  • Latest release: Jan 16, 2014
  • Number of updates: 9
  • Update frequency: every 8.6 days
  • Top authors: wptriggers (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active / 2,686 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼1.23MB] [CPU: ▼40.67ms] Passed 4 tests

This is a short check of server-side resources used by WP Triggers Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7212.04 ▼29.76
Dashboard /wp-admin2.78 ▼0.5318.22 ▼28.08
Posts /wp-admin/edit.php2.78 ▼0.5816.17 ▼31.00
Add New Post /wp-admin/post-new.php2.78 ▼3.1115.20 ▼73.83
Media Library /wp-admin/upload.php2.78 ▼0.4515.09 ▼16.91
All Triggers /wp-admin/admin.php?page=wp-trigger2.7815.07
New Trigger /wp-admin/admin.php?page=add-trigger2.7816.48

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: 1 new table, 7 new options
New tables
wp_trigger
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
wptgg_info

Browser metrics Passed 4 tests

A check of browser resources used by WP Triggers Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲20113.60 ▼0.816.52 ▲4.4742.37 ▼9.33
Dashboard /wp-admin2,235 ▲445.86 ▼0.0595.68 ▼16.4083.19 ▲39.77
Posts /wp-admin/edit.php2,115 ▲292.00 ▼0.0244.04 ▲8.9236.70 ▲0.65
Add New Post /wp-admin/post-new.php1,536 ▼017.66 ▼5.58753.68 ▲78.0656.94 ▼9.37
Media Library /wp-admin/upload.php1,411 ▲294.17 ▼0.0696.32 ▼4.8071.20 ▲27.48
All Triggers /wp-admin/admin.php?page=wp-trigger9631.7127.6352.58
New Trigger /wp-admin/admin.php?page=add-trigger9461.7227.4834.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/function.php+2
    Undefined index: hi_trigger_info
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 0% 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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/function.php+2
    Undefined index: hi_trigger_info
    • > GET request to /wp-admin/admin.php?page=wp-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/function.php+3
    Undefined index: delete
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/pages/admin/add_trigger.php+2
    Undefined index: trigger_id
    • > GET request to /wp-admin/admin.php?page=wp-trigger
    • > Deprecated in wp-content/plugins/wp-triggers-lite/includes/pages/admin/trigger_list.php+2
    Non-static method wptggAction::get_trigger() should not be called statically
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/function.php+105
    Undefined index: orderby
    • > GET request to /wp-admin/admin.php?page=wp-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/function.php+35
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=wp-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/pages/admin/trigger_list.php+8
    Undefined index: paged
    • > GET request to /wp-admin/admin.php?page=wp-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/pages/admin/trigger_list.php+9
    Undefined variable: per_page
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/function.php+98
    Undefined index: order
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/pages/admin/add_trigger.php+55
    Undefined variable: trigger
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/pages/admin/add_trigger.php+18
    Trying to get property 'box_name' of non-object
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/pages/admin/add_trigger.php+23
    Undefined variable: infos
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/function.php+132
    Trying to get property 'type_txt' of non-object
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/function.php+149
    Undefined variable: typetxt
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/function.php+156
    Trying to get property 'display_txt' of non-object
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/pages/admin/add_trigger.php+47
    Trying to get property 'no_found' of non-object
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > Notice in wp-content/plugins/wp-triggers-lite/includes/pages/admin/add_trigger.php+55
    Trying to get property 'show_chk' of non-object

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-triggers-lite/includes/pages/front/trigger_process.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-triggers-lite/includes/pages/front/trigger_process.php on line 4
    • > PHP Notice
      Undefined index: page in wp-content/plugins/wp-triggers-lite/includes/function.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/wp-triggers-lite/uninstall.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-triggers-lite/wp_trigger.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-triggers-lite/includes/pages/admin/add_trigger.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'wptggBackEnd' not found in wp-content/plugins/wp-triggers-lite/includes/pages/admin/trigger_list.php:2
    • > PHP Notice
      Undefined index: hi_trigger_info in wp-content/plugins/wp-triggers-lite/includes/function.php on line 2
    • > PHP Notice
      Undefined index: trigger_id in wp-content/plugins/wp-triggers-lite/includes/pages/admin/add_trigger.php on line 2
    • > PHP Notice
      Undefined variable: param in wp-content/plugins/wp-triggers-lite/includes/pages/front/trigger_process.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > 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/wp-triggers-lite/js/main.js?ver=6.3.1:38:23)\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
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > 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
    • > GET request to /wp-admin/admin.php?page=wp-trigger
    • > Network (severe)
    http://www.wptriggers.com/wp-content/uploads/button-upgrade.png - Failed to load resource: the server responded with a status of 441 ()
    • > GET request to /wp-admin/admin.php?page=add-trigger
    • > 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/wp-triggers-lite/js/pages/admin/add_trigger.js?ver=6.3.1:19:32)\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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.png) image not found
The official readme.txt is a good inspiration

wp-triggers-lite/wp_trigger.php 85% from 13 tests

"WP Triggers Lite" version 2.5.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-triggers-lite.php" instead of "wp_trigger.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 288 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected821 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP623523476
JavaScript52457256
CSS412389

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.75
▷ Minimum class complexity5.00
▷ Maximum class complexity19.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods2187.50%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png29.30KB11.52KB▼ 60.70%
img/wp-triggers-icon.png3.36KB0.68KB▼ 79.67%