78% error-log-file-viewer

Code Review | error_log File Viewer

WordPress plugin error_log File Viewer scored78%from 54 tests.

About plugin

  • Plugin page: error-log-file-vi...
  • Plugin version: 1.5.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Jan 23, 2023
  • Latest release: Jun 26, 2023
  • Number of updates: 18
  • Update frequency: every 8.5 days
  • Top authors: pluginsclub (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /395 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.54ms] Passed 4 tests

Server-side resources used by error_log File Viewer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.76 ▼1.11
Dashboard /wp-admin3.31 ▲0.0144.56 ▼12.32
Posts /wp-admin/edit.php3.41 ▲0.0545.90 ▼2.94
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.70 ▼21.78
Media Library /wp-admin/upload.php3.28 ▲0.0540.08 ▲4.00
error_log /wp-admin/tools.php?page=error_log3.2232.57

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

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

Browser metrics Passed 4 tests

Checking browser requirements for error_log File Viewer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12214.34 ▼0.241.78 ▼0.1740.32 ▼5.73
Dashboard /wp-admin2,286 ▲1095.70 ▲0.0990.49 ▼1.9743.68 ▲3.86
Posts /wp-admin/edit.php2,107 ▲102.02 ▲0.0335.69 ▼3.6836.68 ▲1.72
Add New Post /wp-admin/post-new.php1,529 ▼2517.47 ▼0.76699.68 ▲36.8153.38 ▼4.06
Media Library /wp-admin/upload.php1,404 ▲14.17 ▼0.14114.43 ▲6.8251.54 ▲6.20
error_log /wp-admin/tools.php?page=error_log1,0322.0430.0332.68

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/tools.php?page=error_log
    • > Warning in wp-content/plugins/error-log-file-viewer/includes/settings-page.php+48
    filesize(): stat failed for error_log
    • > GET request to /wp-admin/tools.php?page=error_log
    • > Warning in wp-content/plugins/error-log-file-viewer/includes/settings-page.php+60
    file_get_contents(error_log): failed to open stream: No such file or directory
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=error_log
    • > Notice in wp-content/plugins/error-log-file-viewer/includes/settings-page.php+170
    Undefined variable: selected_error_type

SRP 50% 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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/error-log-file-viewer/error_log-file-viewer.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

error-log-file-viewer/error_log-file-viewer.php 92% from 13 tests

This is the main PHP file of "error_log File Viewer" version 1.5.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("error-log-file-viewer.php" instead of "error_log-file-viewer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin880 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS1142491
PHP38470340
JavaScript33449

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/pluginsclub_logo_black.png22.36KB10.65KB▼ 52.36%