67% wp-charts-and-graphs

Code Review | WP Charts and Graphs - WordPress Chart Plugin

WordPress plugin WP Charts and Graphs - WordPress Chart Plugin scored67%from 54 tests.

About plugin

  • Plugin page: wp-charts-and-graphs
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 6, 2018
  • Latest release: Nov 23, 2023
  • Number of updates: 34
  • Update frequency: every 56.0 days
  • Top authors: pantherius (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /21,526 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.51ms] Passed 4 tests

This is a short check of server-side resources used by WP Charts and Graphs - WordPress Chart Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.33 ▼0.75
Dashboard /wp-admin3.38 ▲0.0349.16 ▼13.15
Posts /wp-admin/edit.php3.49 ▲0.1347.28 ▼2.75
Add New Post /wp-admin/post-new.php5.96 ▲0.0790.26 ▼1.98
Media Library /wp-admin/upload.php3.30 ▲0.0736.17 ▼4.15
Generate Chart /wp-admin/admin.php?page=pantherius_wp_charts3.2831.60
Settings /wp-admin/admin.php?page=pantherius_wp_charts_settings3.2732.39

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Charts and Graphs - WordPress Chart Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14114.14 ▼0.0812.96 ▲11.1144.01 ▼3.55
Dashboard /wp-admin2,215 ▲355.62 ▼0.06105.83 ▲6.9942.78 ▼2.79
Posts /wp-admin/edit.php2,123 ▲231.95 ▼0.0641.26 ▲2.4536.51 ▲0.21
Add New Post /wp-admin/post-new.php1,545 ▲1923.07 ▲2.02606.81 ▼95.0956.05 ▲2.16
Media Library /wp-admin/upload.php1,420 ▲234.19 ▼0.0197.21 ▼17.5941.20 ▼9.39
Generate Chart /wp-admin/admin.php?page=pantherius_wp_charts1,0142.5441.4262.29
Settings /wp-admin/admin.php?page=pantherius_wp_charts_settings8972.5541.6135.49

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=pantherius_wp_charts_settings
    • > Warning in wp-admin/includes/template.php+1771
    call_user_func() expects parameter 1 to be a valid callback, class 'pantherius_wp_charts_settings' does not have a method 'settings_section_pantherius_wp_charts'

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-charts-and-graphs/templates/sidebar.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-charts-and-graphs/templates/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-charts-and-graphs/templates/options.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pantherius_wp_charts_settings
    • > Rendering (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 The specified value "!" 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 is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-charts-and-graphs/wp-charts-and-graphs.php Passed 13 tests

"WP Charts and Graphs - WordPress Chart Plugin" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
33 characters long description:
Add custom charts to your website

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 detected2,945 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62771772,141
CSS25822502
PHP53260302

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity14.00
▷ Minimum class complexity8.00
▷ Maximum class complexity20.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods422.22%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin