10% page-charts

Code Review | Page Charts

WordPress plugin Page Charts scored10%from 54 tests.

About plugin

  • Plugin page: page-charts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.3-6.0
  • WordPress version: 6.3.1
  • First release: Feb 15, 2022
  • Latest release: May 6, 2022
  • Number of updates: 10
  • Update frequency: every 8.0 days
  • Top authors: sidov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /277 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/page-charts/db_config.php+26
    Undefined variable: welcome_name

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.48ms] Passed 4 tests

Server-side resources used by Page Charts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.83 ▼8.03
Dashboard /wp-admin3.32 ▲0.0147.61 ▼3.01
Posts /wp-admin/edit.php3.37 ▲0.0150.44 ▲2.46
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.95 ▼9.08
Media Library /wp-admin/upload.php3.24 ▲0.0139.68 ▲2.22
Page Charts /wp-admin/plugins.php?page=page-charts3.2132.96

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: 2 new tables, 7 new options
New tables
wp_charts_js_library
wp_hchart_names
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
tab_db_version
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Page Charts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲16713.43 ▼0.948.88 ▲7.1541.41 ▼5.26
Dashboard /wp-admin2,203 ▲235.61 ▲0.0996.28 ▼0.0344.08 ▲1.96
Posts /wp-admin/edit.php2,108 ▲52.04 ▲0.0837.24 ▼0.6135.86 ▼1.16
Add New Post /wp-admin/post-new.php1,535 ▲923.06 ▼0.15668.24 ▼23.1859.13 ▲4.32
Media Library /wp-admin/upload.php1,411 ▲84.22 ▲0.1196.44 ▼16.3642.15 ▼3.99
Page Charts /wp-admin/plugins.php?page=page-charts8652.0227.5626.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_charts_js_library
    • wp_hchart_names
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • tab_db_version

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
Good news, no errors were detected

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 fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/page-charts/page-charts.php:11
    • > PHP Warning
      Use of undefined constant label - assumed 'label' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-charts/examples/chart_bar.php on line 3
    • > PHP Warning
      Use of undefined constant datasets - assumed 'datasets' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-charts/examples/chart_bar.php on line 3
    • > PHP Warning
      Use of undefined constant backgroundColor - assumed 'backgroundColor' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-charts/examples/chart_bar.php on line 4
    • > PHP Warning
      Use of undefined constant labels - assumed 'labels' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-charts/examples/chart_bar.php on line 2
    • > PHP Warning
      Use of undefined constant data - assumed 'data' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-charts/examples/chart_bar.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: chart, line, polygon, column, pie...

page-charts/page-charts.php Passed 13 tests

"Page Charts" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
32 characters long description:
Javascript charts for wordpress.

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 plugin553 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3276346
JavaScript2172178
CSS10029

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Constants3
▷ Global constants3100.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