10% lh-email-registration

Code Review | LH Email Registration

WordPress plugin LH Email Registration scored10%from 54 tests.

About plugin

  • Plugin page: lh-email-registra...
  • Plugin version: 2.20
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 1, 2015
  • Latest release: Apr 21, 2017
  • Number of updates: 7
  • Update frequency: every 90.0 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /778 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/lh-email-registration/lh-email-registration.php+228
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.67ms] Passed 4 tests

Analyzing server-side resources used by LH Email Registration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0332.90 ▼3.59
Dashboard /wp-admin3.32 ▲0.0247.55 ▲1.08
Posts /wp-admin/edit.php3.37 ▲0.0246.37 ▼1.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.12 ▲0.12
Media Library /wp-admin/upload.php3.25 ▲0.0232.81 ▼2.14
Email Registration /wp-admin/options-general.php?page=lh-email-registration/lh-email-registration.php3.1928.48

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

LH Email Registration: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.20 ▼1.221.77 ▲0.0740.08 ▼4.13
Dashboard /wp-admin2,210 ▲224.87 ▼0.99101.61 ▼0.1538.21 ▼6.65
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0041.32 ▲5.7334.46 ▼3.93
Add New Post /wp-admin/post-new.php1,540 ▲1723.11 ▲0.03665.33 ▼11.3251.49 ▼0.26
Media Library /wp-admin/upload.php1,389 ▲14.28 ▲0.1197.54 ▲2.0641.54 ▼0.07
Email Registration /wp-admin/options-general.php?page=lh-email-registration/lh-email-registration.php7482.0223.8322.34

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

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

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)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=lh-email-registration/lh-email-registration.php
    • > Warning in wp-content/plugins/lh-email-registration/lh-email-registration.php+204
    include(partials/option-settings.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/options-general.php?page=lh-email-registration/lh-email-registration.php
    • > Warning in wp-content/plugins/lh-email-registration/lh-email-registration.php+204
    include(): Failed opening 'partials/option-settings.php' for inclusion (include_path='.:/usr/share/php')

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
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/lh-email-registration/lh-email-registration.php:287
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/lh-email-registration/includes/lh-personalised-content.php:239

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

lh-email-registration/lh-email-registration.php Passed 13 tests

The principal PHP file in "LH Email Registration" v. 2.20 is loaded by WordPress automatically on each request
116 characters long description:
Streamlines user registration in the backend by removing redundant fields and replaces usernames with email adresses

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected262 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP228729262

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity21.50
▷ Minimum class complexity13.00
▷ Maximum class complexity30.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin