48% ls-wp-logger

Code Review | LS WP Logger

WordPress plugin LS WP Logger scored48%from 54 tests.

About plugin

  • Plugin page: ls-wp-logger
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8
  • WordPress version: 6.3.1
  • First release: Dec 14, 2020
  • Latest release: Aug 31, 2021
  • Number of updates: 3
  • Update frequency: every 87.3 days
  • Top authors: lightningsoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /390 total downloads

Benchmarks

Plugin footprint 30% 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: ▼10.48ms] Passed 4 tests

This is a short check of server-side resources used by LS WP Logger
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.18 ▼3.79
Dashboard /wp-admin3.33 ▼0.0146.57 ▼23.43
Posts /wp-admin/edit.php3.38 ▲0.0344.95 ▼0.69
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.51 ▼14.02
Media Library /wp-admin/upload.php3.25 ▲0.0335.36 ▲0.94

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: 1 new table, 6 new options
New tables
ls_wp_logger
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

LS WP Logger: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.28 ▼0.291.66 ▼0.0537.08 ▼7.32
Dashboard /wp-admin2,240 ▲635.57 ▼0.0882.68 ▼4.0882.30 ▲42.92
Posts /wp-admin/edit.php2,142 ▲452.01 ▼0.0236.07 ▲0.3433.12 ▼2.69
Add New Post /wp-admin/post-new.php1,578 ▲6118.19 ▼0.87686.94 ▲245.7752.74 ▲1.36
Media Library /wp-admin/upload.php1,445 ▲484.21 ▼0.01101.20 ▼2.1572.81 ▲31.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/ls-wp-logger/uninstall.php+5
    require(wp-content/plugins/ls-wp-logger/LS_WP_Logger.php): failed to open stream: No such file or directory
  • Incomplete uninstall procedure, leaving 12 files (0.35MB) in the plugin directory
    • (new file) index.php
    • (new file) ls-wp-logger.php
    • (new file) images/icon-256x256.png
    • (new file) Log.php
    • (new file) images/banner-772x250.png
    • (new file) ls-wp-logger-page.php
    • (new file) images/menu-icon.svg
    • (new file) README.md
    • (new file) js/main.js
    • (new file) css/style.css
    • ...
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • ls_wp_logger
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ls-wp-logger/ls-wp-logger-page.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ls-wp-logger/ls-wp-logger.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
3 plugin tags: data logs, logs, log

ls-wp-logger/ls-wp-logger.php Passed 13 tests

The main PHP script in "LS WP Logger" version 2.0.0 is automatically included on every request by WordPress
44 characters long description:
This plugin stores logs for your application

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected244 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP52210126
JavaScript112068
CSS12017
Markdown16017
SVG10016

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
2 PNG files occupy 0.34MB with 0.21MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-256x256.png8.87KB3.57KB▼ 59.75%
images/banner-772x250.png339.18KB126.55KB▼ 62.69%