90% lh-response-handler

Code Review | LH Response Handler

WordPress plugin LH Response Handler scored90%from 54 tests.

About plugin

  • Plugin page: lh-response-handler
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 13, 2019
  • Latest release: Aug 1, 2022
  • Number of updates: 4
  • Update frequency: every 286.5 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /569 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.11MB] [CPU: ▼117.50ms] Passed 4 tests

Server-side resources used by LH Response Handler
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.20107.29 ▲67.05
Dashboard /wp-admin3.41 ▲0.0349.09 ▼466.77
Posts /wp-admin/edit.php3.53 ▲0.1752.87 ▼3.76
Add New Post /wp-admin/post-new.php6.05 ▲0.1687.32 ▼2.91
Media Library /wp-admin/upload.php3.33 ▲0.1038.38 ▲3.45
Responses /wp-admin/edit.php?post_type=lh_response-url3.3839.84

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
lh_response-status_code_children
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by LH Response Handler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲5314.21 ▼0.061.62 ▼0.0146.13 ▲2.59
Dashboard /wp-admin2,199 ▲195.60 ▼0.0995.65 ▲7.5938.07 ▲0.44
Posts /wp-admin/edit.php2,104 ▲12.04 ▲0.0635.91 ▲0.7934.13 ▲1.54
Add New Post /wp-admin/post-new.php1,534 ▲823.08 ▲2.20624.43 ▼87.0949.60 ▼24.00
Media Library /wp-admin/upload.php1,410 ▲134.21 ▲0.0097.18 ▼39.4043.89 ▼6.42
Responses /wp-admin/edit.php?post_type=lh_response-url1,0871.9632.2830.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • lh_response-status_code_children
    • widget_theysaidso_widget

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 no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: 404, 410, redirect, multisite, status code

lh-response-handler/lh-response-handler.php 92% from 13 tests

The primary PHP file in "LH Response Handler" version 1.00 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected313 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP228728313

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods1456.00%
▷ Public methods2496.00%
▷ Protected methods00.00%
▷ Private methods14.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin