68% lh-web-application

Code Review | LH Web Application

WordPress plugin LH Web Application scored68%from 54 tests.

About plugin

  • Plugin page: lh-web-application
  • Plugin version: 1.28
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Mar 20, 2017
  • Latest release: Sep 16, 2020
  • Number of updates: 32
  • Update frequency: every 61.2 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,737 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.28MB] [CPU: ▲0.24ms] Passed 4 tests

This is a short check of server-side resources used by LH Web Application
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3846.85 ▼2.18
Dashboard /wp-admin3.62 ▲0.3256.27 ▲2.91
Posts /wp-admin/edit.php3.67 ▲0.3256.69 ▲6.86
Add New Post /wp-admin/post-new.php6.14 ▲0.2596.09 ▼1.17
Media Library /wp-admin/upload.php3.48 ▲0.2543.79 ▲1.41
Web Application /wp-admin/options-general.php?page=lh-web-application/lh-web-application.php3.5339.13

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
lh_web_application-manifest_icon_attachment_id
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for LH Web Application
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.31 ▲0.026.59 ▲4.6946.64 ▲3.66
Dashboard /wp-admin2,199 ▲225.63 ▲0.0292.15 ▼5.4142.28 ▲0.81
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0737.17 ▼1.1434.60 ▲1.32
Add New Post /wp-admin/post-new.php1,531 ▲323.02 ▲0.14672.45 ▼102.4057.50 ▼2.72
Media Library /wp-admin/upload.php1,404 ▲74.24 ▲0.04103.85 ▼5.4444.88 ▼2.92
Web Application /wp-admin/options-general.php?page=lh-web-application/lh-web-application.php1,4473.4773.3328.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'LH_web_application_plugin' does not have a method 'uninstall'
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • lh_web_application-manifest_icon_attachment_id

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=lh-web-application/lh-web-application.php
    • > Notice in wp-content/plugins/lh-web-application/includes/partials/option-settings.php+121
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/lh-web-application/partials/sw3.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'LH_web_application_plugin' not found in wp-content/plugins/lh-web-application/includes/lh-web-application-menu-class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_hash() in wp-content/plugins/lh-web-application/partials/sw2.php:3
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/lh-web-application/partials/sw.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/lh-web-application/includes/partials/option-settings.php:1
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/lh-web-application/partials/sw4.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: service worker, android, chrome, web app, pwa

lh-web-application/lh-web-application.php 92% from 13 tests

The primary PHP file in "LH Web Application" version 1.28 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,813 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP81,5962141,653
JavaScript7342129873
CSS2372287

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity53.00
▷ Minimum class complexity1.00
▷ Maximum class complexity148.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods91
▷ Static methods3639.56%
▷ Public methods6975.82%
▷ Protected methods2123.08%
▷ Private methods11.10%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
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 files were detected