84% google-visualization-charts

Code Review | Google Visualization Charts

WordPress plugin Google Visualization Charts scored84%from 54 tests.

About plugin

  • Plugin page: google-visualizat...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.2
  • WordPress version: 6.3.1
  • First release: Dec 9, 2012
  • Latest release: Dec 9, 2012
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: wichtounet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,192 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.13ms] Passed 4 tests

Server-side resources used by Google Visualization Charts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.34 ▼1.97
Dashboard /wp-admin3.33 ▲0.0345.06 ▼4.07
Posts /wp-admin/edit.php3.38 ▲0.0346.12 ▼4.93
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.41 ▼9.54
Media Library /wp-admin/upload.php3.26 ▲0.0340.15 ▲5.82

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google Visualization Charts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10115.27 ▲0.6516.91 ▲15.3439.63 ▼5.31
Dashboard /wp-admin2,206 ▲185.86 ▼0.04108.03 ▼8.0640.02 ▼9.07
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0336.01 ▼5.3335.75 ▲0.20
Add New Post /wp-admin/post-new.php1,520 ▼2223.32 ▲5.25669.00 ▲20.3345.65 ▼14.49
Media Library /wp-admin/upload.php1,385 ▼64.13 ▼0.06109.67 ▲10.0544.75 ▲0.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-visualization-charts/functions.php:268

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: graphs charts

google-visualization-charts/functions.php 92% from 13 tests

The primary PHP file in "Google Visualization Charts" version 0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("google-visualization-charts.php" instead of "functions.php")

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
Everything looks great! No dangerous files found in this plugin144 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17360144

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.11
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%
Functions7
▷ Named functions7100.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
There were not PNG files found in your plugin