90% health-endpoint

Code Review | Health Endpoint

WordPress plugin Health Endpoint scored90%from 54 tests.

About plugin

  • Plugin page: health-endpoint
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 19, 2020
  • Latest release: Oct 5, 2021
  • Number of updates: 16
  • Update frequency: every 23.9 days
  • Top authors: jonotaegi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /10,808 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
This plugin's installer ran successfully

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

Server-side resources used by Health Endpoint
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0546.15 ▲3.16
Dashboard /wp-admin3.34 ▲0.0354.62 ▲2.01
Posts /wp-admin/edit.php3.37 ▲0.0153.61 ▲2.60
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.29 ▼2.38
Media Library /wp-admin/upload.php3.26 ▲0.0341.71 ▲8.65

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Health Endpoint
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.27 ▼0.002.15 ▲0.2941.46 ▼4.44
Dashboard /wp-admin2,192 ▲185.55 ▼0.0690.43 ▼4.5236.60 ▼6.76
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0439.75 ▼0.4436.14 ▼4.04
Add New Post /wp-admin/post-new.php1,534 ▲818.21 ▼4.92605.06 ▼71.0784.42 ▲27.40
Media Library /wp-admin/upload.php1,397 ▼34.16 ▲0.03105.38 ▼3.6642.48 ▼5.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
6 plugin tags: monitor, performance, api, endpoint, health check...

health-endpoint/health-endpoint.php Passed 13 tests

The entry point to "Health Endpoint" version 1.0.1 is a PHP file that has certain tags in its header comment area
106 characters long description:
Creates a /health endpoint that returns a 200 OK HTTP status code while WordPress is performing correctly.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin30 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2175330

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions4
▷ Named functions4100.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
There are no PNG files in this plugin