72% ichart

Code Review | iChart - Easy Charts and Graphs

WordPress plugin iChart - Easy Charts and Graphs scored72%from 54 tests.

About plugin

  • Plugin page: ichart
  • Plugin version: 2.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 13, 2017
  • Latest release: Oct 23, 2023
  • Number of updates: 51
  • Update frequency: every 47.3 days
  • Top authors: quantumcloud (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /20,822 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.17MB] [CPU: ▼10.37ms] Passed 4 tests

Analyzing server-side resources used by iChart - Easy Charts and Graphs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1841.09 ▲4.70
Dashboard /wp-admin3.48 ▲0.1346.75 ▼18.00
Posts /wp-admin/edit.php3.59 ▲0.2444.89 ▼13.67
Add New Post /wp-admin/post-new.php6.08 ▲0.1981.51 ▼9.09
Media Library /wp-admin/upload.php3.40 ▲0.1734.83 ▼0.71
Help /wp-admin/admin.php?page=qcopd_ichart_info_page3.3734.29
Support /wp-admin/admin.php?page=qcopd_ichart_supports3.3731.17

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 142 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for iChart - Easy Charts and Graphs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,647 ▲88614.86 ▲0.469.58 ▲7.9631.64 ▼8.44
Dashboard /wp-admin2,938 ▲7585.79 ▲0.12119.87 ▲29.1941.31 ▲1.99
Posts /wp-admin/edit.php2,845 ▲7422.92 ▲0.9264.01 ▲19.6834.07 ▼1.87
Add New Post /wp-admin/post-new.php7,101 ▲5,57328.96 ▲6.04864.60 ▲184.1537.03 ▼19.82
Media Library /wp-admin/upload.php2,137 ▲7375.24 ▲0.94132.53 ▲31.1047.60 ▲3.17
Help /wp-admin/admin.php?page=qcopd_ichart_info_page1,7342.6650.9231.69
Support /wp-admin/admin.php?page=qcopd_ichart_supports2,2622.6958.2379.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ichart/qcld_ichart_main.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ichart/qc-ichart-info-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/ichart/inc/covid19/includes/render_map.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ichart/class-qc-free-plugin-upgrade-notice.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/ichart/inc/covid19/includes/render_mapus.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ichart/inc/covid19/includes/render_card.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ichart/qcld_ichart_shortcode.php:152
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ichart/qc-support-promo-page/class-qc-support-promo-page.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=qcopd_ichart_info_page
    • > Network (severe)
    wp-content/plugins/ichart//assets/img/shortcode-generator.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=qcopd_ichart_info_page
    • > Network (severe)
    wp-content/plugins/ichart//assets/img/shortcode-modal.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: corona, charts, covid, geochart, graphs...

ichart/qcld_ichart_main.php 77% from 13 tests

The main file in "iChart - Easy Charts and Graphs" v. 2.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ichart.php" instead of "qcld_ichart_main.php")
  • Domain Path: The domain path points to an invalid folder, "/lang/" does not exist
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.6" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected49,462 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript265,0723,93725,209
CSS101538512,571
JSON3007,068
SVG4002,690
PHP123891471,873
Sass46134
Markdown18017

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity17.33
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions2388.46%
▷ Anonymous functions311.54%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
45 PNG files occupy 1.02MB with 0.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
qc-support-promo-page/images/feature03.png3.86KB2.04KB▼ 47.24%
qc-support-promo-page/images/sld-icon-256x256.png24.41KB11.18KB▼ 54.18%
qc-support-promo-page/images/premium-themes.png75.71KB20.13KB▼ 73.42%
qc-support-promo-page/images/iList-icon-256x256.png12.99KB6.05KB▼ 53.44%
qc-support-promo-page/images/logo.png5.98KB3.38KB▼ 43.47%