83% chart-for-elementor

Code Review | Chart for Elementor

WordPress plugin Chart for Elementor scored83%from 54 tests.

About plugin

  • Plugin page: chart-for-elementor
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 4, 2021
  • Latest release: Oct 28, 2022
  • Number of updates: 6
  • Update frequency: every 54.7 days
  • Top authors: imranhosain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /937 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.02MB] [CPU: ▼3.01ms] Passed 4 tests

Analyzing server-side resources used by Chart for Elementor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.32 ▲2.98
Dashboard /wp-admin3.33 ▲0.0249.93 ▼0.10
Posts /wp-admin/edit.php3.38 ▲0.0245.00 ▼1.45
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.30 ▼9.20
Media Library /wp-admin/upload.php3.25 ▲0.0235.12 ▼1.28

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Chart for Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲6114.48 ▲0.101.75 ▼0.3345.16 ▼0.07
Dashboard /wp-admin2,227 ▲394.87 ▼0.97102.28 ▼17.4942.46 ▼2.15
Posts /wp-admin/edit.php2,106 ▲142.02 ▲0.0138.61 ▼3.1036.05 ▼2.48
Add New Post /wp-admin/post-new.php1,527 ▲1317.45 ▼0.01633.14 ▼94.4349.37 ▼6.19
Media Library /wp-admin/upload.php1,406 ▲244.19 ▼0.0398.12 ▼6.7741.57 ▼1.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/chart-for-elementor/elementor-chart.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
You can take inspiration from this readme.txt

chart-for-elementor/elementor-chart.php 77% from 13 tests

This is the main PHP file of "Chart for Elementor" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Main file name: Name the main plugin file the same as the plugin slug ("chart-for-elementor.php" instead of "elementor-chart.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 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected248 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP27259216
SVG10120
JavaScript3869
CSS1003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.50
▷ Minimum class complexity7.00
▷ Maximum class complexity8.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods18
▷ Static methods15.56%
▷ Public methods1688.89%
▷ Protected methods211.11%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin