89% googlegraph

Code Review | GoogleGraph

WordPress plugin GoogleGraph scored 89% from 54 tests.

About plugin

  • Plugin page: googlegraph
  • Plugin version: 0.4.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 5.8.1
  • First release: May 15, 2014
  • Latest release: Jul 5, 2015
  • Number of updates: 40
  • Update frequency: every 10.4 days
  • Top authors: jvrtanoski (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

500+ active / 8,664 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼142.10ms] Passed 4 tests

An overview of server-side resources used by GoogleGraph
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1936.01 ▲10.63
Dashboard /wp-admin3.13 ▲0.0849.96 ▲2.88
Posts /wp-admin/edit.php3.19 ▲0.0850.17 ▲3.46
Add New Post /wp-admin/post-new.php5.49 ▲0.0695.92 ▼576.98
Media Library /wp-admin/upload.php3.08 ▲0.0836.27 ▲2.23

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for GoogleGraph
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,752 ▲15616.13 ▲0.6311.53 ▲3.5349.29 ▲0.56
Dashboard /wp-admin3,008 ▲716.45 ▲0.50149.81 ▲3.58117.31 ▼11.19
Posts /wp-admin/edit.php2,755 ▲162.96 ▲0.2771.48 ▲3.97102.74 ▲19.49
Add New Post /wp-admin/post-new.php1,618 ▼6518.94 ▲0.17374.71 ▼12.99115.46 ▲0.38
Media Library /wp-admin/upload.php1,823 ▲755.35 ▲0.36182.83 ▲31.45135.70 ▲10.40

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 50% 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 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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/googlegraph/admin/help.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/googlegraph/googlegraph.php on line 32
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/googlegraph/googlegraph.php on line 32
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/googlegraph/googlegraph.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/googlegraph/googlegraph.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: google, charts, geo-chart, graphs, google charts

googlegraph/googlegraph.php Passed 13 tests

"GoogleGraph" version 0.4.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
22 characters long description:
Generate Google Chart.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin500 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27789500

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1789.47%
▷ Protected methods00.00%
▷ Private methods210.53%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected