72% chart-builder

Code Review | Best Chart Plugin - Chartify

WordPress plugin Best Chart Plugin - Chartify scored72%from 54 tests.

About plugin

  • Plugin page: chart-builder
  • Plugin version: 1.9.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2022
  • Latest release: Nov 30, 2023
  • Number of updates: 210
  • Update frequency: every 1.8 days
  • Top authors: ays-pro (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active /63,801 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.43MB] [CPU: ▲2.33ms] 75% from 4 tests

Server-side resources used by Best Chart Plugin - Chartify
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 4,880.94ms on /wp-admin/admin.php?page=chart-builder-featured-plugins)
PageMemory (MB)CPU Time (ms)
Home /4.86 ▲1.4042.20 ▲2.28
Dashboard /wp-admin4.75 ▲1.4553.86 ▲8.07
Posts /wp-admin/edit.php4.78 ▲1.4356.85 ▲11.68
Add New Post /wp-admin/post-new.php7.45 ▲1.5684.18 ▼6.02
Media Library /wp-admin/upload.php4.69 ▲1.4642.07 ▲4.97
All Charts /wp-admin/admin.php?page=chart-builder4.83104.90
Add New /wp-admin/admin.php?page=chart-builder&action=add5.3476.23
Our products /wp-admin/admin.php?page=chart-builder-featured-plugins5.224,880.94
How to use /wp-admin/admin.php?page=chart-builder-dashboard4.6451.24
General Settings /wp-admin/admin.php?page=chart-builder-settings4.6876.12
PRO Features /wp-admin/admin.php?page=chart-builder-chart-features4.7451.24

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 177 new files
Database: 3 new tables, 9 new options
New tables
wp_ayschart_charts
wp_ayschart_settings
wp_ayschart_charts_meta
New WordPress options
ays_chart_sale_btn
widget_recent-comments
ays_chart_20_bundle_banner_time
ays_chart_db_version
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Best Chart Plugin - Chartify
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲22213.82 ▼0.4212.21 ▲10.5331.88 ▼12.32
Dashboard /wp-admin2,234 ▲565.52 ▼0.1989.24 ▼26.8684.41 ▲39.04
Posts /wp-admin/edit.php2,154 ▲541.99 ▲0.0338.58 ▲1.7038.23 ▲3.01
Add New Post /wp-admin/post-new.php6,408 ▲4,88227.92 ▲4.781,023.84 ▲351.5069.03 ▲23.04
Media Library /wp-admin/upload.php1,442 ▲454.16 ▼0.0294.26 ▼4.4975.97 ▲30.77
All Charts /wp-admin/admin.php?page=chart-builder2,04711.37386.11123.74
Add New /wp-admin/admin.php?page=chart-builder&action=add7,0246.22151.74117.08
Our products /wp-admin/admin.php?page=chart-builder-featured-plugins1,4054.7749.0458.28
How to use /wp-admin/admin.php?page=chart-builder-dashboard1,80315.68298.9468.42
General Settings /wp-admin/admin.php?page=chart-builder-settings1,6685.3172.4164.19
PRO Features /wp-admin/admin.php?page=chart-builder-chart-features2,2004.9647.0775.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • ays_chart_sale_btn
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • ays_chart_20_bundle_banner_time
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% 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)
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/chart-builder/public/partials/chart-builder-public-display.php
  • 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ChartBuilder\\Helpers\\Chart_Builder_Plugin_Silent_Upgrader_Skin' not found in wp-content/plugins/chart-builder/includes/admin/class-chart-builder-skin.php:11
    • > PHP Warning
      Use of undefined constant CHART_BUILDER_ADMIN_URL - assumed 'CHART_BUILDER_ADMIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/chart-builder/admin/partials/settings/chart-builder-settings.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/chart-builder/includes/admin/class-chart-builder-upgrader.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader-skin.php' (include_path='.:/usr/share/php') in wp-content/plugins/chart-builder/includes/admin/class-chart-builder-install-skin.php on line 6
    • > PHP Warning
      Use of undefined constant CHART_BUILDER_ADMIN_PATH - assumed 'CHART_BUILDER_ADMIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/chart-builder/admin/partials/charts/actions/chart-builder-charts-actions.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader.php' (include_path='.:/usr/share/php') in wp-content/plugins/chart-builder/includes/admin/class-chart-builder-upgrader.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/chart-builder/admin/partials/features/chart-builder-features-display.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CBActions() in wp-content/plugins/chart-builder/admin/partials/charts/actions/chart-builder-charts-actions-options.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/chart-builder/admin/partials/chart-builder-admin-display.php:33
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/chart-builder/admin/partials/settings/chart-builder-settings.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=chart-builder&action=add
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=chart-builder&action=add 1701 The specified value "#ccc" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 97% 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: The official readme.txt is a good inspiration

chart-builder/chart-builder.php Passed 13 tests

The main PHP script in "Best Chart Plugin - Chartify" version 1.9.8 is automatically included on every request by WordPress
61 characters long description:
Display the results with various charts and compare the data.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected20,043 lines of code in 95 files:
LanguageFilesBlank linesComment linesLines of code
PHP321,3782,4908,981
JavaScript196133306,091
CSS208791,2374,647
SVG2451324

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 135)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity50.71
▷ Minimum class complexity1.00
▷ Maximum class complexity268.00
Average method complexity5.38
▷ Minimum method complexity1.00
▷ Maximum method complexity135.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods193
▷ Static methods2713.99%
▷ Public methods16786.53%
▷ Protected methods136.74%
▷ Private methods136.74%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
63 compressed PNG files occupy 0.39MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icons/gantt-chart.png0.53KB0.55KB0.00%
admin/images/icons/timeline-chart.png0.52KB0.47KB▼ 8.90%
admin/images/icons/table-chart.png0.44KB0.38KB▼ 14.13%
admin/images/icons/bubble-chart.png0.71KB1.04KB0.00%
admin/images/icons/geo-chart-logo.png3.57KB3.69KB0.00%