79% heygov

Code Review | HeyGov

WordPress plugin HeyGov scored79%from 54 tests.

About plugin

  • Plugin page: heygov
  • Plugin version: 1.8.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 29, 2022
  • Latest release: Sep 27, 2023
  • Number of updates: 17
  • Update frequency: every 35.7 days
  • Top authors: heygov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,655 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.60MB] [CPU: ▼19.39ms] Passed 4 tests

Analyzing server-side resources used by HeyGov
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.67 ▼4.43
Dashboard /wp-admin3.39 ▲0.0846.90 ▼0.01
Posts /wp-admin/edit.php3.50 ▲0.1447.96 ▼6.92
Add New Post /wp-admin/post-new.php3.26 ▼2.6339.47 ▼66.21
Media Library /wp-admin/upload.php3.31 ▲0.0838.35 ▲1.97

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for HeyGov
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8914.43 ▲0.085.18 ▲2.9438.13 ▼7.94
Dashboard /wp-admin2,219 ▲395.59 ▼0.1087.83 ▼0.0437.59 ▼3.29
Posts /wp-admin/edit.php2,121 ▲181.99 ▼0.0538.00 ▼5.1733.13 ▼1.34
Add New Post /wp-admin/post-new.php1,554 ▲2623.19 ▲0.10637.26 ▼18.4059.95 ▼0.13
Media Library /wp-admin/upload.php1,415 ▲154.18 ▲0.0196.69 ▼21.0943.55 ▼5.54

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/heygov/pagebuilder-module/includes/frontend.js.php
    • > /wp-content/plugins/heygov/includes/view/show-heygov-muni-forms.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/heygov/pagebuilder-module/includes/frontend.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/heygov/includes/view/show-heygov-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_wp_error() in wp-content/plugins/heygov/includes/view/show-venue.php:2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/heygov/includes/view/show-heygov-muni-forms.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/heygov/pagebuilder-module/heygov-pb-module.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/heygov/includes/view/apps-banner.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/heygov/heygov.php:14
    • > PHP Notice
      Undefined variable: forms in wp-content/plugins/heygov/includes/view/show-heygov-muni-forms.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: reporting, forms, issue reporting, permits, heygov

heygov/heygov.php Passed 13 tests

Analyzing the main PHP file in "HeyGov" version 1.8.1
63 characters long description:
Manage the HeyGov widget on your municipality WordPress website

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin1,343 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP1115839747
CSS210613423
JavaScript210199
SVG100070
Markdown1204

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.80
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/badge-play-store.png11.70KB6.09KB▼ 47.94%