84% lh-personalised-content

Code Review | LH Personalised Content

WordPress plugin LH Personalised Content scored84%from 54 tests.

About plugin

  • Plugin page: lh-personalised-c...
  • Plugin version: 1.31
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 1, 2015
  • Latest release: Nov 30, 2015
  • Number of updates: 6
  • Update frequency: every 30.3 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by LH Personalised Content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.04 ▼3.69
Dashboard /wp-admin3.33 ▲0.0249.84 ▼10.26
Posts /wp-admin/edit.php3.38 ▲0.0251.18 ▲1.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.29 ▼6.40
Media Library /wp-admin/upload.php3.25 ▲0.0235.77 ▼0.33

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for LH Personalised Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.15 ▼0.121.69 ▲0.0343.71 ▲1.93
Dashboard /wp-admin2,195 ▲155.62 ▼0.0387.41 ▼5.3140.10 ▲0.53
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0140.20 ▲2.9936.41 ▲1.25
Add New Post /wp-admin/post-new.php1,526 ▼023.28 ▼0.32668.29 ▼8.3851.62 ▼10.52
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.01104.69 ▼2.4744.66 ▼5.52

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/lh-personalised-content/lh-personalised-content.php:249

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: personalise, sender email, name, sender, emails...

lh-personalised-content/lh-personalised-content.php Passed 13 tests

This is the main PHP file of "LH Personalised Content" version 1.31, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
103 characters long description:
Creates a shortcodes for personalised content that can be used on your website of your WordPress emails

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 plugin106 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113917106

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
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
No PNG files were detected