78% graphina-elementor-charts-and-graphs

Code Review | Graphina - Elementor Charts and Graphs

WordPress plugin Graphina - Elementor Charts and Graphs scored78%from 54 tests.

About plugin

  • Plugin page: graphina-elemento...
  • Plugin version: 1.8.8
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2020
  • Latest release: Dec 1, 2023
  • Number of updates: 152
  • Update frequency: every 8.1 days
  • Top authors: iqonicdesign (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

10,000+ active /159,058 total downloads

Benchmarks

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

Analyzing server-side resources used by Graphina - Elementor Charts and Graphs
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.91 ▼4.36
Dashboard /wp-admin3.31 ▲0.0045.38 ▼4.36
Posts /wp-admin/edit.php3.36 ▲0.0044.92 ▼1.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.70 ▼19.10
Media Library /wp-admin/upload.php3.24 ▲0.0034.01 ▼2.10
Settings /wp-admin/admin.php?page=graphina-chart3.0123.52
Upgrade To Pro /wp-admin/admin.php?page=graphina-chart-pro3.0125.89

Server storage [IO: ▲11.37MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 103 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
graphina_common_setting
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Graphina - Elementor Charts and Graphs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲10914.30 ▼0.051.76 ▲0.0145.96 ▲1.60
Dashboard /wp-admin2,195 ▲185.53 ▼0.1297.20 ▼1.5743.83 ▲0.13
Posts /wp-admin/edit.php2,100 ▼02.12 ▲0.1839.87 ▲0.8636.00 ▲0.26
Add New Post /wp-admin/post-new.php1,526 ▼923.44 ▼1.57647.17 ▲23.2361.03 ▼4.27
Media Library /wp-admin/upload.php1,400 ▼04.14 ▼0.0295.29 ▼1.5541.51 ▲1.04
Settings /wp-admin/admin.php?page=graphina-chart280.410.123.80
Upgrade To Pro /wp-admin/admin.php?page=graphina-chart-pro280.410.103.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • graphina_common_setting
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/user.php' (include_path='.:/usr/share/php') in wp-content/plugins/graphina-elementor-charts-and-graphs/utils/graphina_chart_helper.php on line 4243
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/user.php): failed to open stream: No such file or directory in wp-content/plugins/graphina-elementor-charts-and-graphs/utils/graphina_chart_helper.php on line 4243
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/graphina-elementor-charts-and-graphs/utils/graphina_chart_helper.php on line 4243
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/user.php' (include_path='.:/usr/share/php') in wp-content/plugins/graphina-elementor-charts-and-graphs/utils/graphina_chart_helper.php on line 4243
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/user.php): failed to open stream: No such file or directory in wp-content/plugins/graphina-elementor-charts-and-graphs/utils/graphina_chart_helper.php on line 4243
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/graphina-elementor-charts-and-graphs/utils/graphina_chart_helper.php on line 4243

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=graphina-chart
    • > Network (severe)
    wp-admin/admin.php?page=graphina-chart - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=graphina-chart-pro
    • > Network (severe)
    wp-admin/admin.php?page=graphina-chart-pro - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
The official readme.txt is a good inspiration

graphina-elementor-charts-and-graphs/graphina-charts-for-elementor.php 85% from 13 tests

"Graphina - Elementor Charts and Graphs" version 1.8.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("graphina-elementor-charts-and-graphs.php" instead of "graphina-charts-for-elementor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin32,563 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP432,3652,05620,491
SVG4009,562
JavaScript171391511,430
CSS10140661,058
JSON20022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity42.44
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity6.35
▷ Minimum method complexity1.00
▷ Maximum method complexity81.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods248
▷ Static methods208.06%
▷ Public methods19779.44%
▷ Protected methods4518.15%
▷ Private methods62.42%
Functions86
▷ Named functions7991.86%
▷ Anonymous functions78.14%
Constants4
▷ Global constants4100.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
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
elementor/css/images/sort_both.png0.20KB0.29KB0.00%
elementor/css/images/sort_asc.png0.16KB0.25KB0.00%
elementor/css/images/sort_asc_disabled.png0.14KB0.25KB0.00%
elementor/css/images/sort_desc_disabled.png0.14KB0.25KB0.00%
elementor/css/images/sort_desc.png0.15KB0.25KB0.00%