10% unified-logging

Code Review | Unified Logging

WordPress plugin Unified Logging scored10%from 54 tests.

About plugin

  • Plugin page: unified-logging
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 6.3.1
  • First release: Dec 18, 2012
  • Latest release: Dec 20, 2012
  • Number of updates: 9
  • Update frequency: every 30.6 days
  • Top authors: unifiedlogging (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /660 total downloads

Benchmarks

Plugin footprint 40% 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
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method unifiedlogging::unifiedlogging_activate() should not be called statically

Server metrics [RAM: ▼1.20MB] [CPU: ▼44.45ms] Passed 4 tests

An overview of server-side resources used by Unified Logging
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6914.36 ▼26.57
Dashboard /wp-admin2.82 ▼0.4916.12 ▼36.53
Posts /wp-admin/edit.php2.82 ▼0.5416.44 ▼33.85
Add New Post /wp-admin/post-new.php2.82 ▼3.0818.67 ▼80.85
Media Library /wp-admin/upload.php2.82 ▼0.4216.68 ▼20.96
Unified Logging /wp-admin/options-general.php?page=unifiedlogging2.8217.60

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
unifiedlogging_version
can_compress_scripts
theysaidso_admin_options
db_upgraded
plugin_unifieidlogging_settings
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Unified Logging
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6913.92 ▼0.641.68 ▼0.1037.21 ▼9.46
Dashboard /wp-admin2,215 ▲355.69 ▲0.0289.08 ▲0.8641.66 ▼0.93
Posts /wp-admin/edit.php2,120 ▲201.97 ▼0.0336.12 ▼0.6238.76 ▼0.28
Add New Post /wp-admin/post-new.php1,390 ▼13820.30 ▼2.77526.92 ▼128.2446.25 ▼16.09
Media Library /wp-admin/upload.php1,420 ▲204.16 ▼0.0497.26 ▼8.9242.49 ▼2.82
Unified Logging /wp-admin/options-general.php?page=unifiedlogging1,1812.1226.9532.05

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 did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method unifiedlogging::unifiedlogging_include() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=unifiedlogging
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method unifiedlogging::unifiedlogging_include() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=unifiedlogging
    • > Deprecated in wp-content/plugins/unified-logging/unifiedlogging-ui.php+129
    Non-static method unifiedlogging::get_level() should not be called statically

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 take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/unified-logging/unifiedlogging-ui.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/unified-logging/unifiedlogging.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'unifiedlogging' not found in wp-content/plugins/unified-logging/ul-error-handler.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: error, debug, log, admin

unified-logging/unifiedlogging.php 85% from 13 tests

This is the main PHP file of "Unified Logging" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 250 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("unified-logging.php" instead of "unifiedlogging.php")

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 detected522 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP375103522

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.54
Average class complexity50.00
▷ Minimum class complexity50.00
▷ Maximum class complexity50.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 images were found in this plugin