78% intelliwidget-elements

Code Review | IntelliWidget Elements

WordPress plugin IntelliWidget Elements scored 78% from 54 tests.

About plugin

  • Plugin page: intelliwidget-ele...
  • Plugin version: 2.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.6
  • WordPress version: 5.9.2
  • First release: Sep 22, 2013
  • Latest release: Feb 10, 2021
  • Number of updates: 38
  • Update frequency: every 71.0 days
  • Top authors: lilaeamedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,384 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.75MB] [CPU: ▼301.87ms] Passed 4 tests

Server-side resources used by IntelliWidget Elements
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.33 ▲0.8167.52 ▲7.34
Dashboard /wp-admin4.14 ▲0.7242.75 ▼13.00
Posts /wp-admin/edit.php4.39 ▲0.7557.93 ▲18.67
Add New Post /wp-admin/post-new.php7.88 ▲0.91107.73 ▼1,208.48
Media Library /wp-admin/upload.php4.02 ▲0.7233.22 ▲6.68
Conditional Profiles /wp-admin/admin.php?page=iwelements-condsets4.4638.79
Modules /wp-admin/admin.php?page=iwelements4.0233.61

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 110 new files
Database: no new tables, 1 new option
New WordPress options
widget_intelliwidget

Browser metrics Passed 4 tests

A check of browser resources used by IntelliWidget Elements
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,872 ▲12817.74 ▲2.126.20 ▼1.102.21 ▲0.17
Dashboard /wp-admin2,999 ▲1388.01 ▲1.78141.32 ▲8.83156.70 ▼9.23
Posts /wp-admin/edit.php2,950 ▲2595.43 ▲2.2080.29 ▲16.66141.30 ▼1.47
Add New Post /wp-admin/post-new.php2,043 ▲38222.91 ▲5.77365.50 ▼54.74176.70 ▲21.06
Media Library /wp-admin/upload.php1,717 ▲195.94 ▲0.43115.16 ▼27.38190.74 ▲5.62
Conditional Profiles /wp-admin/admin.php?page=iwelements-condsets1,6335.1289.17197.17
Modules /wp-admin/admin.php?page=iwelements1,3594.4771.49145.19

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_intelliwidget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/intelliwidget-elements/modules/main/forms/error.php
    • > /wp-content/plugins/intelliwidget-elements/modules/main/forms/profiles.php
    • > /wp-content/plugins/intelliwidget-elements/modules/main/forms/complete.php
    • > /wp-content/plugins/intelliwidget-elements/modules/main/forms/addl-settings.php
  • 19× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: term in wp-content/plugins/intelliwidget-elements/modules/condset/forms/term-metabox.php on line 1
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/intelliwidget-elements/modules/main/forms/profiles.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/intelliwidget-elements/modules/condset/forms/conditions.php:3
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/intelliwidget-elements/modules/main/forms/profiles.php on line 6
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/intelliwidget-elements/modules/condset/forms/condsettab.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/intelliwidget-elements/modules/condset/forms/condset-metabox.php:2
    • > PHP Notice
      Undefined variable: condset_id in wp-content/plugins/intelliwidget-elements/modules/condset/forms/condset-metabox.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/intelliwidget-elements/modules/condset/forms/condset.php:1
    • > PHP Notice
      Undefined variable: active in wp-content/plugins/intelliwidget-elements/modules/condset/forms/condsettab.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/intelliwidget-elements/modules/main/forms/upgrade.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: post type, intelliwidget

intelliwidget-elements/intelliwidget.php 77% from 13 tests

"IntelliWidget Elements" version 2.2.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("intelliwidget-elements.php" instead of "intelliwidget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected31,300 lines of code in 100 files:
LanguageFilesBlank linesComment linesLines of code
CSS101,62131114,668
JavaScript131,7372,8918,369
PHP761,2612,0678,204
SVG10059

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity41.89
▷ Minimum class complexity1.00
▷ Maximum class complexity327.00
Average method complexity4.97
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes36
▷ Abstract classes25.56%
▷ Concrete classes3494.44%
▷ Final classes00.00%
Methods373
▷ Static methods9024.13%
▷ Public methods34993.57%
▷ Protected methods205.36%
▷ Private methods41.07%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/bg_direction_nav.png1.82KB0.79KB▼ 56.38%
css/images/switch.png0.38KB0.21KB▼ 45.64%