93% maxicharts-query-builder-add-on

Code Review | MaxiCharts Query Builder Add-on

WordPress plugin MaxiCharts Query Builder Add-on scored 93% from 54 tests.

About plugin

  • Plugin page: maxicharts-query-...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 5.8.1
  • First release: Sep 27, 2017
  • Latest release: Jan 4, 2021
  • Number of updates: 52
  • Update frequency: every 23.0 days
  • Top authors: munger41 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 2,060 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼149.18ms] Passed 4 tests

Analyzing server-side resources used by MaxiCharts Query Builder Add-on
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2237.86 ▲9.71
Dashboard /wp-admin3.17 ▲0.1144.46 ▼10.46
Posts /wp-admin/edit.php3.28 ▲0.1742.62 ▼9.79
Add New Post /wp-admin/post-new.php5.52 ▲0.0997.42 ▼576.84
Media Library /wp-admin/upload.php3.11 ▲0.1134.48 ▲0.38

Server storage [IO: ▲27.44MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • Total filesystem usage must be limited to 25MB (currently using 27.44MB)
Filesystem: 2,073 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

MaxiCharts Query Builder Add-on: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.93 ▲0.4110.85 ▼0.5448.18 ▼3.71
Dashboard /wp-admin2,970 ▲365.95 ▲0.00149.38 ▼19.06109.79 ▼7.40
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0169.45 ▼13.5288.64 ▼11.16
Add New Post /wp-admin/post-new.php1,683 ▼018.75 ▲1.69432.47 ▲20.23113.45 ▲2.34
Media Library /wp-admin/upload.php1,810 ▲35.01 ▼0.01154.48 ▼0.96121.90 ▼13.69

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 130× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Assetic\\Factory\\Resource\\ResourceInterface' not found in wp-content/plugins/maxicharts-query-builder-add-on/libs/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/IteratorResourceInterface.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Assetic\\Factory\\Loader\\FormulaLoaderInterface' not found in wp-content/plugins/maxicharts-query-builder-add-on/libs/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Assetic\\Filter\\BaseCssFilter' not found in wp-content/plugins/maxicharts-query-builder-add-on/libs/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssCacheBustingFilter.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Process\\Pipes\\AbstractPipes' not found in wp-content/plugins/maxicharts-query-builder-add-on/libs/vendor/symfony/process/Pipes/UnixPipes.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Assetic\\Filter\\BaseNodeFilter' not found in wp-content/plugins/maxicharts-query-builder-add-on/libs/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessFilter.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Assetic\\Asset\\BaseAsset' not found in wp-content/plugins/maxicharts-query-builder-add-on/libs/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ComponentInstaller\\Test\\Process\\ProcessTest' not found in wp-content/plugins/maxicharts-query-builder-add-on/libs/vendor/robloach/component-installer/tests/ComponentInstaller/Test/Process/RequireJsProcessTest.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Assetic\\Filter\\DependencyExtractorInterface' not found in wp-content/plugins/maxicharts-query-builder-add-on/libs/vendor/kriswallsmith/assetic/src/Assetic/Filter/PhpCssEmbedFilter.php:24
    • > PHP Warning
      Use of undefined constant STDIN - assumed 'STDIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/maxicharts-query-builder-add-on/libs/vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php on line 17
    • > PHP Warning
      Use of undefined constant STDERR - assumed 'STDERR' (this will throw an Error in a future version of PHP) in wp-content/plugins/maxicharts-query-builder-add-on/libs/vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in maxicharts-query-builder-add-on/assets to your readme.txt
  • Tags: There are too many tags (26 tag instead of maximum 10)
The official readme.txt is a good inspiration

maxicharts-query-builder-add-on/maxicharts_querybuilder_add_on.php 77% from 13 tests

"MaxiCharts Query Builder Add-on" version 1.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("maxicharts-query-builder-add-on.php" instead of "maxicharts_querybuilder_add_on.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected399,323 lines of code in 1,756 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1,14240,85231,445289,917
HTML556,63778631,835
CSS401,43214926,040
JSON93107023,109
PHP1603,0045,18611,344
LESS711,1751,5425,590
Sass971,3241,0825,474
Markdown341,22802,928
TypeScript496133392,521
SVG100288
YAML92818165
XML35075
Bourne Shell112035
Windows Module Definition1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.95
▷ Minimum class complexity1.00
▷ Maximum class complexity162.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces25
Interfaces15
Traits0
Classes137
▷ Abstract classes139.49%
▷ Concrete classes12490.51%
▷ Final classes00.00%
Methods1,010
▷ Static methods302.97%
▷ Public methods91790.79%
▷ Protected methods494.85%
▷ Private methods444.36%
Functions36
▷ Named functions925.00%
▷ Anonymous functions2775.00%
Constants68
▷ Global constants710.29%
▷ Class constants6189.71%
▷ Public constants61100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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
libs/vendor/mistic100/jquery-querybuilder/examples/screenshot.png15.28KB7.35KB▼ 51.91%
libs/node_modules/jQuery-QueryBuilder/examples/screenshot.png15.28KB7.35KB▼ 51.91%