77% visualizer

Code Review | Visualizer: Tables and Charts Manager for WordPress #

WordPress plugin Visualizer: Tables and Charts Manager for WordPress # scored77%from 54 tests.

About plugin

  • Plugin page: visualizer
  • Plugin version: 3.10.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Jul 21, 2013
  • Latest release: Aug 17, 2023
  • Number of updates: 194
  • Update frequency: every 19.0 days
  • Top authors: codeinwp (38.14%)themeisle (32.99%)madpixels (29.9%)

Code review

54 tests

User reviews

219 reviews

Install metrics

30,000+ active /1,536,790 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲2.74MB] [CPU: ▲17.99ms] 75% from 4 tests

Server-side resources used by Visualizer: Tables and Charts Manager for WordPress #
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 3,792.91ms on /wp-admin/admin.php?page=ti-about-visualizer)
PageMemory (MB)CPU Time (ms)
Home /6.03 ▲2.5760.34 ▲12.51
Dashboard /wp-admin6.14 ▲2.8464.16 ▲11.26
Posts /wp-admin/edit.php6.16 ▲2.8160.22 ▲11.23
Add New Post /wp-admin/post-new.php9.31 ▲3.42161.95 ▲74.23
Media Library /wp-admin/upload.php5.99 ▲2.7672.49 ▲36.95
Support /wp-admin/admin.php?page=viz-support5.9549.79
Setup Wizard /wp-admin/admin.php?page=visualizer-setup-wizard6.0360.77
About Us /wp-admin/admin.php?page=ti-about-visualizer6.963,792.91

Server storage [IO: ▲15.65MB] [DB: ▲0.90MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 928 new files
Database: no new tables, 11 new options
New WordPress options
widget_theysaidso_widget
visualizer_fresh_install
visualizer_install
can_compress_scripts
visualizer-new-user
visualizer-upgraded-from
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
...

Browser metrics Passed 4 tests

Visualizer: Tables and Charts Manager for WordPress #: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,010 ▲24914.38 ▼0.181.73 ▼0.1732.25 ▼7.82
Dashboard /wp-admin2,419 ▲2395.55 ▼0.0685.17 ▼8.5645.34 ▲2.61
Posts /wp-admin/edit.php2,199 ▲961.99 ▼0.0435.06 ▼6.1932.34 ▼17.54
Add New Post /wp-admin/post-new.php1,619 ▲9124.92 ▲1.78910.47 ▲230.6839.40 ▼22.58
Media Library /wp-admin/upload.php1,496 ▲1024.31 ▲0.09100.12 ▼1.4543.30 ▼1.72
Support /wp-admin/admin.php?page=viz-support1,46410.20277.9662.20
Setup Wizard /wp-admin/admin.php?page=visualizer-setup-wizard1,6162.4257.32259.16
About Us /wp-admin/admin.php?page=ti-about-visualizer1,2176.46142.2243.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.90MB] 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 does not fully uninstall, leaving 10 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • visualizer_install
    • widget_recent-posts
    • can_compress_scripts
    • visualizer-upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • visualizer-new-user
    • visualizer-upgraded-from

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 121× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/samples/Basic/01_Simple_download_xls.php
    • > /wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/samples/Autofilter/10_Autofilter_selection_display.php
    • > /wp-content/plugins/visualizer/vendor/markbaker/complex/examples/complexTest.php
    • > /wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/samples/Chart/34_Chart_update.php
    • > /wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/samples/Basic/31_Document_properties_write_xls.php
    • > /wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/samples/Chart/33_Chart_create_area.php
    • > /wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/samples/Basic/01_Simple_download_ods.php
    • > /wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/samples/Pdf/21_Pdf_TCPDF.php
    • > /wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/samples/Basic/04_Printing.php
    • > /wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/samples/Reader/17_Simple_file_reader_loading_several_named_worksheets.php
  • 4095× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type int in wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php on line 58
    • > PHP Notice
      Trying to access array offset on value of type int in wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php on line 58
    • > PHP Notice
      Trying to access array offset on value of type int in wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php on line 58
    • > PHP Notice
      Trying to access array offset on value of type int in wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php on line 58
    • > PHP Notice
      Trying to access array offset on value of type int in wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php on line 58
    • > PHP Notice
      Trying to access array offset on value of type int in wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php on line 58
    • > PHP Notice
      Trying to access array offset on value of type int in wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php on line 58
    • > PHP Notice
      Trying to access array offset on value of type int in wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php on line 58
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php on line 1108
    • > PHP Notice
      Trying to access array offset on value of type int in wp-content/plugins/visualizer/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php on line 58

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #10, #11, #12, #13, #2, #3, #4, #5, #6, #7, #8, #9 in visualizer/assets to your readme.txt
Please take inspiration from this readme.txt

visualizer/index.php 85% from 13 tests

The entry point to "Visualizer: Tables and Charts Manager for WordPress #" version 3.10.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("visualizer.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 332 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin153,078 lines of code in 674 files:
LanguageFilesBlank linesComment linesLines of code
PHP51917,02639,40683,035
XML40039,739
JavaScript761,95899311,518
Markdown323,009011,102
CSS194531353,922
SVG6111,680
PO File1266378773
JSON100403
Sass1690342
C#10451318
HTML1240106
YAML314183
MSBuild script10757

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,016)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity39.27
▷ Minimum class complexity1.00
▷ Maximum class complexity1,016.00
Average method complexity4.34
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces55
Interfaces10
Traits0
Classes309
▷ Abstract classes247.77%
▷ Concrete classes28592.23%
▷ Final classes10.35%
Methods3,679
▷ Static methods80721.94%
▷ Public methods2,70273.44%
▷ Protected methods2526.85%
▷ Private methods72519.71%
Functions125
▷ Named functions7862.40%
▷ Anonymous functions4737.60%
Constants886
▷ Global constants252.82%
▷ Class constants86197.18%
▷ Public constants861100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
71 PNG files occupy 1.83MB with 0.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/computer.png0.55KB0.61KB0.00%
vendor/phpoffice/phpspreadsheet/docs/topics/images/01-03-filter-icon-1.png0.44KB0.31KB▼ 30.68%
vendor/phpoffice/phpspreadsheet/docs/topics/images/09-command-line-calculation.png43.29KB16.14KB▼ 62.71%
images/lib/datatables/back_enabled.png1.35KB0.60KB▼ 55.69%
images/chosen-sprite.png0.53KB0.88KB0.00%