79% dashboard-log-monitor

Code Review | Dashboard Log Monitor

WordPress plugin Dashboard Log Monitor scored79%from 54 tests.

About plugin

  • Plugin page: dashboard-log-mon...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.2
  • WordPress version: 6.3.1
  • First release: Nov 20, 2014
  • Latest release: May 30, 2018
  • Number of updates: 19
  • Update frequency: every 109.4 days
  • Top authors: onnimonni (73.68%)seravo (15.79%)Zuige (15.79%)deployer (10.53%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,774 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.41ms] Passed 4 tests

Analyzing server-side resources used by Dashboard Log Monitor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0538.72 ▼5.74
Dashboard /wp-admin3.35 ▲0.0548.22 ▼0.75
Posts /wp-admin/edit.php3.46 ▲0.1149.32 ▲3.22
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.18 ▼16.81
Media Library /wp-admin/upload.php3.27 ▲0.0436.05 ▲1.65

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
dashboard_widget_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Dashboard Log Monitor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲8113.22 ▼1.154.68 ▲2.7539.17 ▲0.70
Dashboard /wp-admin2,241 ▲535.81 ▲0.92104.30 ▼1.6544.25 ▲1.47
Posts /wp-admin/edit.php2,094 ▲81.97 ▼0.0848.82 ▲11.9142.34 ▲6.01
Add New Post /wp-admin/post-new.php1,533 ▼423.58 ▲0.47640.44 ▲36.7361.69 ▲12.53
Media Library /wp-admin/upload.php1,384 ▼44.19 ▼0.1499.96 ▲6.2042.07 ▲0.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • dashboard_widget_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/dashboard-log-monitor/log-parser/tests/bootstrap.php
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/dashboard-log-monitor/log-parser/tests/Kassner/Tests/LogParser/Apache/RefererTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Kassner\\Tests\\LogParser\\Provider\\IpAddress' not found in wp-content/plugins/dashboard-log-monitor/log-parser/tests/Kassner/Tests/LogParser/Format/LocalIpAddressTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/dashboard-log-monitor/log-parser/tests/Kassner/Tests/LogParser/Apache/CommomTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/dashboard-log-monitor/log-parser/tests/Kassner/Tests/LogParser/Provider/HostName.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/dashboard-log-monitor/log-parser/tests/Kassner/Tests/LogParser/Apache/AgentTest.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/dashboard-log-monitor/widget.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Kassner\\Tests\\LogParser\\Provider\\PositiveInteger' not found in wp-content/plugins/dashboard-log-monitor/log-parser/tests/Kassner/Tests/LogParser/Format/BytesReceivedTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Kassner\\Tests\\LogParser\\Provider\\IpAddress' not found in wp-content/plugins/dashboard-log-monitor/log-parser/tests/Kassner/Tests/LogParser/Format/RemoteIpAddressTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Kassner\\Tests\\LogParser\\Provider\\PositiveInteger' not found in wp-content/plugins/dashboard-log-monitor/log-parser/tests/Kassner/Tests/LogParser/Format/BytesSentTest.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dashboard-log-monitor/dashboard-log-monitor.php:33

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: log, access log, admin, dashboard, seravo

dashboard-log-monitor/dashboard-log-monitor.php Passed 13 tests

The main PHP script in "Dashboard Log Monitor" version 1.0.4 is automatically included on every request by WordPress
67 characters long description:
Take a sneak peek on your access logs from the wordpress dashboard.

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
Success! There were no dangerous files found in this plugin1,118 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP26213234922
Markdown222087
JSON20045
CSS17344
YAML10013
XML1007

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.22
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods69
▷ Static methods1014.49%
▷ Public methods5072.46%
▷ Protected methods1826.09%
▷ Private methods11.45%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin