79% log-viewer

Code Review | Log Viewer

WordPress plugin Log Viewer scored 79% from 54 tests.

About plugin

  • Plugin page: log-viewer
  • Plugin version: 14.05.04
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.9
  • WordPress version: 5.8.1
  • First release: Sep 30, 2012
  • Latest release: May 4, 2014
  • Number of updates: 27
  • Update frequency: every 21.5 days
  • Top authors: mfisc (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active / 59,735 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼167.40ms] Passed 4 tests

An overview of server-side resources used by Log Viewer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.90 ▲12.91
Dashboard /wp-admin3.12 ▲0.0743.02 ▼8.38
Posts /wp-admin/edit.php3.24 ▲0.1346.19 ▼6.70
Add New Post /wp-admin/post-new.php5.48 ▲0.0590.42 ▼649.36
Media Library /wp-admin/upload.php3.07 ▲0.0633.04 ▼5.14
Log Viewer /wp-admin/tools.php?page=log_viewer_files_view3.0830.25

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options
1_log-viewer_settings

Browser metrics Passed 4 tests

Checking browser requirements for Log Viewer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲10315.79 ▲0.288.11 ▼0.7247.24 ▼2.95
Dashboard /wp-admin2,972 ▲385.88 ▼0.31144.52 ▼17.86114.14 ▲1.25
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0071.07 ▼4.7288.67 ▼8.53
Add New Post /wp-admin/post-new.php1,686 ▲318.68 ▼0.07373.64 ▼22.27110.92 ▲4.77
Media Library /wp-admin/upload.php1,815 ▲55.02 ▼0.01149.93 ▼28.35126.34 ▼11.09
Log Viewer /wp-admin/tools.php?page=log_viewer_files_view1,0302.0554.1665.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • 1_log-viewer_settings

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/log-viewer/views/debug-bar-panel.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: showEditSection in wp-content/plugins/log-viewer/views/debug-bar-panel.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/log-viewer/admin/views/files-view.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Bar_Panel' not found in wp-content/plugins/log-viewer/includes/class-dbpanel.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: advanced, admin, debug, log, development

log-viewer/log-viewer.php Passed 13 tests

Analyzing the main PHP file in "Log Viewer" version 14.05.04
79 characters long description:
This plugin provides an easy way to view log files directly in the admin panel.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin593 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9198499593

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.20
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods32
▷ Static methods1340.62%
▷ Public methods2681.25%
▷ Protected methods00.00%
▷ Private methods618.75%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants110.00%
▷ Class constants990.00%
▷ Public constants9100.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
There were not PNG files found in your plugin