10% debug-logger

Code Review | Debug Logger

WordPress plugin Debug Logger scored10%from 54 tests.

About plugin

  • Plugin page: debug-logger
  • Plugin version: 0.3.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.7
  • WordPress version: 6.3.1
  • First release: Apr 30, 2021
  • Latest release: May 3, 2021
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: awoods (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /398 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Error in wp-content/plugins/debug-logger/lib/php-fig-log/Psr/Log/AbstractLogger.php+12
    Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in wp-content/plugins/debug-logger/lib/php-fig-log/Psr/Log/AbstractLogger.php:12
    Stack trace:
    #0 wp-content/plugins/debug-logger/loader.php(10): require_once()
    #1 wp-content/plugins/debug-logger/wp-debug-logger.php(15): require_once('/var/www/wordpr...')
    #2 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #3 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.93ms] Passed 4 tests

Server-side resources used by Debug Logger
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.23 ▼5.13
Dashboard /wp-admin3.31 ▲0.0052.18 ▲2.49
Posts /wp-admin/edit.php3.36 ▲0.0049.01 ▼1.78
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.13 ▼20.50
Media Library /wp-admin/upload.php3.23 ▲0.0033.44 ▼0.31

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Debug Logger
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.61 ▼0.011.82 ▲0.1946.58 ▲5.75
Dashboard /wp-admin2,198 ▲275.58 ▼0.1282.09 ▼16.2638.66 ▼3.09
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0736.53 ▼3.6331.75 ▼5.68
Add New Post /wp-admin/post-new.php1,528 ▲223.01 ▼0.03668.58 ▼0.8253.30 ▼0.21
Media Library /wp-admin/upload.php1,394 ▼64.13 ▼0.06101.83 ▼0.5943.47 ▼1.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/debug-logger/lib/php-fig-log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/debug-logger/lib/php-fig-log/Psr/Log/AbstractLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/debug-logger/lib/php-fig-log/Psr/Log/AbstractLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/debug-logger/src/class-logger.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/debug-logger/lib/php-fig-log/Psr/Log/Test/TestLogger.php:57
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/debug-logger/lib/php-fig-log/Psr/Log/NullLogger.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/debug-logger/lib/php-fig-log/Psr/Log/AbstractLogger.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: logging, development, dev, debug, logs...

debug-logger/wp-debug-logger.php 77% from 13 tests

The main PHP file in "Debug Logger" ver. 0.3.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("debug-logger.php" instead of "wp-debug-logger.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected751 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP16132566502
Markdown2910223
JSON10026

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.39
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces3
Interfaces2
Traits2
Classes9
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
Methods73
▷ Static methods1013.70%
▷ Public methods73100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants11
▷ Global constants327.27%
▷ Class constants872.73%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin