78% lh-cookieless-domain

Code Review | LH Cookieless Domain

WordPress plugin LH Cookieless Domain scored78%from 54 tests.

About plugin

  • Plugin page: lh-cookieless-domain
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 24, 2018
  • Latest release: Aug 28, 2019
  • Number of updates: 3
  • Update frequency: every 113.0 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /709 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.41ms] Passed 4 tests

Server-side resources used by LH Cookieless Domain
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0527.09 ▼16.01
Dashboard /wp-admin3.34 ▲0.0347.81 ▼1.48
Posts /wp-admin/edit.php3.39 ▲0.0351.21 ▲0.55
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.26 ▼9.43
Media Library /wp-admin/upload.php3.26 ▲0.0334.31 ▼2.71
Cookieless Domain /wp-admin/options-general.php?page=lh-cookieless-domain/lh-cookieless-domain.php3.2230.11

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

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

Browser metrics Passed 4 tests

Checking browser requirements for LH Cookieless Domain
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,774 ▼1214.31 ▼0.051.56 ▼0.3212.47 ▼32.40
Dashboard /wp-admin2,199 ▲195.64 ▼0.0293.34 ▼0.1042.03 ▲7.18
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0640.71 ▲4.2634.58 ▼5.53
Add New Post /wp-admin/post-new.php1,531 ▲323.33 ▲0.48591.64 ▼51.1770.72 ▲10.68
Media Library /wp-admin/upload.php1,401 ▲44.20 ▼0.03101.84 ▼14.5946.97 ▼1.45
Cookieless Domain /wp-admin/options-general.php?page=lh-cookieless-domain/lh-cookieless-domain.php7842.0025.3925.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=lh-cookieless-domain/lh-cookieless-domain.php
    • > Notice in wp-content/plugins/lh-cookieless-domain/partials/option-settings.php+2
    Undefined property: LH_Cookieless_domain_plugin::$hidden_field_name
    • > GET request to /wp-admin/options-general.php?page=lh-cookieless-domain/lh-cookieless-domain.php
    • > Notice in wp-content/plugins/lh-cookieless-domain/partials/option-settings.php+7
    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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/lh-cookieless-domain/partials/option-settings.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Requires at least: The plugin version is formatted incorrectly
You can look at the official readme.txt

lh-cookieless-domain/lh-cookieless-domain.php 92% from 13 tests

The main PHP script in "LH Cookieless Domain" version 1.02 is automatically included on every request by WordPress
Please take the time 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 glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin146 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP314123146

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected