84% hearken

Code Review | Hearken

WordPress plugin Hearken scored84%from 54 tests.

About plugin

  • Plugin page: hearken
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 3, 2021
  • Latest release: May 7, 2022
  • Number of updates: 7
  • Update frequency: every 48.4 days
  • Top authors: wearehearken (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,134 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.83ms] Passed 4 tests

Server-side resources used by Hearken
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.87 ▼7.35
Dashboard /wp-admin3.35 ▲0.0451.77 ▼1.30
Posts /wp-admin/edit.php3.46 ▲0.1047.25 ▼1.87
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.51 ▼8.81
Media Library /wp-admin/upload.php3.27 ▲0.0440.61 ▲0.11

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Hearken
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▼0.271.68 ▼0.1738.55 ▼8.33
Dashboard /wp-admin2,198 ▲215.59 ▼0.0195.77 ▼6.9542.70 ▼0.97
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0233.96 ▲0.0134.25 ▲0.16
Add New Post /wp-admin/post-new.php1,526 ▼223.12 ▼0.07693.37 ▲12.2553.34 ▼5.07
Media Library /wp-admin/upload.php1,394 ▼64.18 ▲0.01100.19 ▼11.2040.46 ▼8.33

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hearken/public/partials/hearken-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: community, engagement, audience, hearken, newspack

hearken/hearken.php Passed 13 tests

This is the main PHP file of "Hearken" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
63 characters long description:
Embed audience and community engagement resources from Hearken.

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
Good job! No executable or dangerous file extensions detected255 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10107492189
CSS112563
JavaScript12203

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.33
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.35
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods23
▷ Static methods417.39%
▷ Public methods1982.61%
▷ Protected methods00.00%
▷ Private methods417.39%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin