72% charts-and-graphs-manager

Code Review | Charts And Graphs Manager

WordPress plugin Charts And Graphs Manager scored72%from 54 tests.

About plugin

  • Plugin page: charts-and-graphs...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 13, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 3
  • Update frequency: every 120.7 days
  • Top authors: mgplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /177 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 gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▲1.59ms] Passed 4 tests

An overview of server-side resources used by Charts And Graphs Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1938.35 ▼1.00
Dashboard /wp-admin3.49 ▲0.1952.00 ▲6.63
Posts /wp-admin/edit.php3.54 ▲0.1951.05 ▲0.94
Add New Post /wp-admin/post-new.php6.10 ▲0.21104.96 ▲7.57
Media Library /wp-admin/upload.php3.42 ▲0.1935.22 ▼0.22
All Charts /wp-admin/edit.php?post_type=charts3.4636.84
Add New /wp-admin/post-new.php?post_type=charts3.4756.56

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Charts And Graphs Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲11214.14 ▼0.634.92 ▲2.9738.30 ▼3.38
Dashboard /wp-admin2,259 ▲715.34 ▼0.55115.84 ▲1.9142.17 ▼4.62
Posts /wp-admin/edit.php2,147 ▲582.43 ▲0.4242.70 ▲0.9535.50 ▼0.01
Add New Post /wp-admin/post-new.php1,558 ▲3023.24 ▲4.91613.70 ▲1.4933.54 ▼21.65
Media Library /wp-admin/upload.php1,444 ▲564.54 ▲0.32101.78 ▲3.0642.87 ▼1.83
All Charts /wp-admin/edit.php?post_type=charts1,1302.4041.9834.88
Add New /wp-admin/post-new.php?post_type=charts3,2824.05149.0443.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/charts-and-graphs-manager/custom-chart-main.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/charts-and-graphs-manager/includes/frontend/cagm_frontend.php:341
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/charts-and-graphs-manager/admin/cagm_chart.php:35

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=charts
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=charts
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=charts
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultString is deprecated since version 5.5.0! Use wp.i18n instead.
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=charts
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

charts-and-graphs-manager/custom-chart-main.php 85% from 13 tests

"Charts And Graphs Manager" version 1.0'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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("charts-and-graphs-manager.php" instead of "custom-chart-main.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin15,302 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript418020314,037
PHP31171581,225
CSS11040

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected