83% daext-uberchart

Code Review | UberChart

WordPress plugin UberChart scored83%from 54 tests.

About plugin

  • Plugin page: daext-uberchart
  • Plugin version: 1.03
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 26, 2023
  • Latest release: Jun 26, 2023
  • Number of updates: 6
  • Update frequency: every 2.3 days
  • Top authors: daext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /148 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▲0.36ms] Passed 4 tests

An overview of server-side resources used by UberChart
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.53 ▼2.29
Dashboard /wp-admin3.73 ▲0.4345.88 ▼0.61
Posts /wp-admin/edit.php3.78 ▲0.4247.32 ▲3.86
Add New Post /wp-admin/post-new.php6.27 ▲0.3990.94 ▲1.66
Media Library /wp-admin/upload.php3.59 ▲0.3634.95 ▲2.68
Pro Version /wp-admin/admin.php?page=daextubch-pro-version3.5636.52
Export to Pro /wp-admin/admin.php?page=daextubch-export_to_pro3.5533.05
Charts /wp-admin/admin.php?page=daextubch-charts5.9155.73
Maintenance /wp-admin/admin.php?page=daextubch-maintenance3.5832.17
Options /wp-admin/admin.php?page=daextubch-options3.5632.46
Help /wp-admin/admin.php?page=daextubch-help3.5532.59

Server storage [IO: ▲4.76MB] [DB: ▲0.11MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 138 new files
Database: 2 new tables, 13 new options
New tables
wp_daextubch_chart
wp_daextubch_data
New WordPress options
daextubch_chartjs_adapter_date_fns_url
daextubch_database_version
daextubch_max_execution_time
daextubch_assets_mode
widget_recent-posts
daextubch_memory_limit
daextubch_verify_single_shortcode
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
...

Browser metrics Passed 4 tests

A check of browser resources used by UberChart
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲16214.32 ▲0.0213.13 ▲11.0837.57 ▼9.53
Dashboard /wp-admin2,248 ▲574.86 ▼0.07139.64 ▲33.4042.10 ▼0.60
Posts /wp-admin/edit.php2,134 ▲451.99 ▲0.0036.57 ▼0.0333.45 ▼0.34
Add New Post /wp-admin/post-new.php6,241 ▲4,71322.50 ▲4.27849.29 ▲251.6280.70 ▲21.13
Media Library /wp-admin/upload.php1,433 ▲454.16 ▼0.06102.53 ▼4.3143.86 ▼5.76
Pro Version /wp-admin/admin.php?page=daextubch-pro-version8652.0325.1024.97
Export to Pro /wp-admin/admin.php?page=daextubch-export_to_pro8192.0325.4125.30
Charts /wp-admin/admin.php?page=daextubch-charts11,9866.54406.6273.87
Maintenance /wp-admin/admin.php?page=daextubch-maintenance9972.6655.4328.16
Options /wp-admin/admin.php?page=daextubch-options1,0422.6239.5530.90
Help /wp-admin/admin.php?page=daextubch-help8412.0524.0626.25

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/daext-uberchart/admin/view/help.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/daext-uberchart/admin/view/pro_version.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/daext-uberchart/admin/view/export_to_pro.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/daext-uberchart/admin/view/maintenance.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/daext-uberchart/admin/view/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/daext-uberchart/admin/view/charts.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

daext-uberchart/init.php 92% from 13 tests

This is the main PHP file of "UberChart" version 1.03, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("daext-uberchart.php" instead of "init.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected68,452 lines of code in 118 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript806,5465,42653,926
PHP161,81194410,165
CSS188272544,333
Markdown312027
XML1001

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 165)
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity61.17
▷ Minimum class complexity7.00
▷ Maximum class complexity224.00
Average method complexity5.46
▷ Minimum method complexity1.00
▷ Maximum method complexity165.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods81
▷ Static methods78.64%
▷ Public methods7288.89%
▷ Protected methods00.00%
▷ Private methods911.11%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
16 PNG files occupy 0.16MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/update-hover.png15.48KB0.51KB▼ 96.73%
admin/assets/img/clone-hover.png18.71KB0.12KB▼ 99.34%
admin/assets/img/search-hover.png0.21KB0.21KB0.00%
admin/assets/img/search.png0.21KB0.21KB0.00%
admin/assets/img/clone.png18.71KB0.12KB▼ 99.34%