52% wp-business-intelligence-lite

Code Review | WP Business Intelligence Lite

WordPress plugin WP Business Intelligence Lite scored 52% from 54 tests.

About plugin

  • Plugin page: wp-business-intel...
  • Plugin version: 3.2.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: May 1, 2013
  • Latest release: Jan 1, 2023
  • Number of updates: 173
  • Update frequency: every 20.4 days
  • Top authors: calberti (76.3%)kentonhirowatari (12.72%)joeyoungblood (12.14%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active / 27,545 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.54MB] [CPU: ▲33.92ms] Passed 4 tests

This is a short check of server-side resources used by WP Business Intelligence Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4971.97 ▲32.58
Dashboard /wp-admin3.86 ▲0.5680.41 ▲34.63
Posts /wp-admin/edit.php3.91 ▲0.5587.38 ▲41.73
Add New Post /wp-admin/post-new.php6.48 ▲0.59122.57 ▲26.73
Media Library /wp-admin/upload.php3.78 ▲0.5580.52 ▲49.30
Variables /wp-admin/admin.php?page=variable3.8274.80
Home /wp-admin/admin.php?page=wpbi-lite3.7968.71
Connections /wp-admin/admin.php?page=database-connection4.4577.73
Chartjs Line Chart /wp-admin/admin.php?page=chartjs-line-chart3.7267.12
Charts /wp-admin/admin.php?page=chart3.9167.26
Data Sources /wp-admin/admin.php?page=data-sources3.8066.33
Bar Chart /wp-admin/admin.php?page=bar-chart3.7262.04
WordPress Data /wp-admin/admin.php?page=wordpress-data-connection3.9167.55
Queries /wp-admin/admin.php?page=query4.0667.89
Grouped Bar Chart /wp-admin/admin.php?page=grouped-bar-chart3.7265.03

Server storage [IO: ▲3.95MB] [DB: ▲0.02MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 1,088 new files
Database: 14 new tables, 7 new options
New tables
wp_wpbi_pie_charts
wp_wpbi_wp_data_queries
wp_wpbi_radar_charts
wp_wpbi_wordpress_data_connections
wp_wpbi_chartjs_doughnut_charts
wp_wpbi_database_connections
wp_wpbi_grouped_bar_charts
wp_wpbi_chartjs_line_charts
wp_wpbi_queries3
wp_wpbi_bar_charts
...
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
recovery_mode_email_last_sent
widget_recent-comments

Browser metrics Passed 4 tests

WP Business Intelligence Lite: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲21013.90 ▼0.474.18 ▲2.1935.42 ▼12.79
Dashboard /wp-admin2,346 ▲1555.48 ▲0.6598.92 ▼3.4241.58 ▲2.89
Posts /wp-admin/edit.php2,232 ▲1432.34 ▲0.3342.88 ▲7.5344.15 ▲9.03
Add New Post /wp-admin/post-new.php1,442 ▼9121.05 ▼2.19589.54 ▼74.9949.06 ▼12.29
Media Library /wp-admin/upload.php1,531 ▲1464.83 ▲0.6996.92 ▼3.4544.68 ▲1.29
Variables /wp-admin/admin.php?page=variable9002.2231.3233.57
Home /wp-admin/admin.php?page=wpbi-lite8972.1926.2530.43
Connections /wp-admin/admin.php?page=database-connection1,0352.1337.9740.37
Chartjs Line Chart /wp-admin/admin.php?page=chartjs-line-chart7891.719.0727.40
Charts /wp-admin/admin.php?page=chart1,0202.3527.8330.22
Data Sources /wp-admin/admin.php?page=data-sources9452.2329.2930.62
Bar Chart /wp-admin/admin.php?page=bar-chart7901.899.1120.83
WordPress Data /wp-admin/admin.php?page=wordpress-data-connection1,0442.2225.3930.94
Queries /wp-admin/admin.php?page=query1,0362.2025.6528.33
Grouped Bar Chart /wp-admin/admin.php?page=grouped-bar-chart7891.719.1324.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure failed, leaving 14 tables in the database
    • wp_wpbi_chartjs_doughnut_charts
    • wp_wpbi_wordpress_data_connections
    • wp_wpbi_database_connections
    • wp_wpbi_grouped_bar_charts
    • wp_wpbi_bar_charts
    • wp_wpbi_wp_data_queries
    • wp_wpbi_queries3
    • wp_wpbi_chartjs_line_charts
    • wp_wpbi_line_charts
    • wp_wpbi_datatables
    • ...
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wordpress-data-connection
    • > User deprecated in wp-content/plugins/wp-business-intelligence-lite/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php+261
    The "Doctrine\Common\Inflector\Inflector::pluralize" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=grouped-bar-chart
    • > Notice in wp-content/plugins/wp-business-intelligence-lite/Admin/Menu/AbstractChart.php+20
    Undefined index: library
    • > GET request to /wp-admin/admin.php?page=chartjs-line-chart
    • > Warning in wp-content/plugins/wp-business-intelligence-lite/autoload.php+13
    require(wp-content/plugins/wp-business-intelligence-lite/Admin/Url//ChartjsLineChart.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=chartjs-line-chart
    • > Compile error in wp-content/plugins/wp-business-intelligence-lite/autoload.php+13
    require(): Failed opening required 'wp-content/plugins/wp-business-intelligence-lite/Admin/Url//ChartjsLineChart.php' (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/admin.php?page=bar-chart
    • > Warning in wp-content/plugins/wp-business-intelligence-lite/autoload.php+13
    require(wp-content/plugins/wp-business-intelligence-lite/Admin/Url//BarChart.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=bar-chart
    • > Compile error in wp-content/plugins/wp-business-intelligence-lite/autoload.php+13
    require(): Failed opening required 'wp-content/plugins/wp-business-intelligence-lite/Admin/Url//BarChart.php' (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/admin.php?page=grouped-bar-chart
    • > Warning in wp-content/plugins/wp-business-intelligence-lite/autoload.php+13
    require(wp-content/plugins/wp-business-intelligence-lite/Admin/Url//GroupedBarChart.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=grouped-bar-chart
    • > Compile error in wp-content/plugins/wp-business-intelligence-lite/autoload.php+13
    require(): Failed opening required 'wp-content/plugins/wp-business-intelligence-lite/Admin/Url//GroupedBarChart.php' (include_path='.:/usr/share/php')

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 12× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-business-intelligence-lite/templates/chart/chartjs/line-chart.php
    • > /wp-content/plugins/wp-business-intelligence-lite/templates/chart/pie-chart.php
    • > /wp-content/plugins/wp-business-intelligence-lite/templates/chart/chartjs/doughnut-chart.php
    • > /wp-content/plugins/wp-business-intelligence-lite/templates/chart/chartjs/vertical-bar-chart.php
    • > /wp-content/plugins/wp-business-intelligence-lite/templates/admin/partials/QuerySelector.php
    • > /wp-content/plugins/wp-business-intelligence-lite/vendor/league/plates/example/templates/sidebar.php
    • > /wp-content/plugins/wp-business-intelligence-lite/vendor/symfony/translation/Resources/bin/translation-status.php
    • > /wp-content/plugins/wp-business-intelligence-lite/templates/chart/grouped-bar-chart.php
    • > /wp-content/plugins/wp-business-intelligence-lite/templates/chart/line-chart.php
    • > /wp-content/plugins/wp-business-intelligence-lite/templates/admin/partials/QueryInstructions.php
  • 511× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Console\\Output\\OutputInterface' not found in wp-content/plugins/wp-business-intelligence-lite/vendor/symfony/console/Output/NullOutput.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Phinx\\Config\\ConfigInterface' not found in wp-content/plugins/wp-business-intelligence-lite/vendor/robmorgan/phinx/src/Phinx/Config/Config.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Wpbi\\Database\\BaseMigration' not found in wp-content/plugins/wp-business-intelligence-lite/Database/migrations/20210830170141_create_wordpress_data_connection.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Phinx\\Console\\Command\\AbstractCommand' not found in wp-content/plugins/wp-business-intelligence-lite/vendor/robmorgan/phinx/src/Phinx/Console/Command/SeedCreate.php:40
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/wp-business-intelligence-lite/templates/chart/pie-chart.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Config\\Exception\\LoaderLoadException' not found in wp-content/plugins/wp-business-intelligence-lite/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface' not found in wp-content/plugins/wp-business-intelligence-lite/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Database\\Schema\\Grammars\\Grammar' not found in wp-content/plugins/wp-business-intelligence-lite/vendor/illuminate/database/Schema/Grammars/PostgresGrammar.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Wpbi\\Database\\BaseMigration' not found in wp-content/plugins/wp-business-intelligence-lite/Database/Update/UpdateLineCharts.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Doctrine\\Inflector\\WordInflector' not found in wp-content/plugins/wp-business-intelligence-lite/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformation.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt might help

wp-business-intelligence-lite/index.php 92% from 13 tests

"WP Business Intelligence Lite" version 3.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-business-intelligence-lite.php" instead of "index.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
It is important to fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-business-intelligence-lite/vendor/robmorgan/phinx/bin/phinx.bat
      • wp-content/plugins/wp-business-intelligence-lite/vendor/nesbot/carbon/bin/upgrade-carbon.bat
77,124 lines of code in 1,048 files:
LanguageFilesBlank linesComment linesLines of code
PHP93215,88442,13965,886
Markdown631,59404,774
JSON29003,019
XSD392482,803
JavaScript31040238
HTML5112120
XML46084
reStructuredText1747874
YAML28062
DOS Batch212627
CSS22022
TOML13012
Bourne Shell1203

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 158)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.03
▷ Minimum class complexity1.00
▷ Maximum class complexity293.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity158.00
Code structure
Namespaces157
Interfaces140
Traits12
Classes580
▷ Abstract classes396.72%
▷ Concrete classes54193.28%
▷ Final classes346.28%
Methods6,101
▷ Static methods83713.72%
▷ Public methods4,82179.02%
▷ Protected methods92015.08%
▷ Private methods3605.90%
Functions369
▷ Named functions14037.94%
▷ Anonymous functions22962.06%
Constants276
▷ Global constants113.99%
▷ Class constants26596.01%
▷ Public constants25696.60%

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.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/league/plates/doc/static/favicon/apple-touch-icon-precomposed.png5.40KB2.79KB▼ 48.42%
vendor/league/plates/doc/static/images/logo.png2.25KB1.53KB▼ 32.22%