78% custom-error-log

Code Review | Custom Error Log

WordPress plugin Custom Error Log scored78%from 54 tests.

About plugin

  • Plugin page: custom-error-log
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.0
  • WordPress version: 6.3.1
  • First release: Oct 22, 2014
  • Latest release: Oct 23, 2014
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: danbahrami (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

70+ active /3,150 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.58ms] Passed 4 tests

A check of server-side resources used by Custom Error Log
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.46 ▼3.51
Dashboard /wp-admin3.38 ▲0.0751.96 ▲2.06
Posts /wp-admin/edit.php3.49 ▲0.1351.16 ▼1.70
Add New Post /wp-admin/post-new.php5.96 ▲0.0798.68 ▼7.17
Media Library /wp-admin/upload.php3.30 ▲0.0749.09 ▲12.06
Error Log /wp-admin/tools.php?page=custom-error-log3.2935.26

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
db_upgraded
custom_notice_log
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
cel_new_logs
cel_ab_show
custom_error_log

Browser metrics Passed 4 tests

A check of browser resources used by Custom Error Log
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6814.78 ▲0.401.69 ▼0.5145.45 ▲2.15
Dashboard /wp-admin2,219 ▲315.83 ▲0.01139.18 ▲29.8247.01 ▲2.20
Posts /wp-admin/edit.php2,120 ▲522.06 ▲0.0542.09 ▲3.0835.76 ▼4.40
Add New Post /wp-admin/post-new.php1,523 ▼1117.69 ▼5.54668.39 ▼9.6659.66 ▼34.52
Media Library /wp-admin/upload.php1,401 ▲104.11 ▼0.16118.26 ▲10.7944.16 ▲0.78
Error Log /wp-admin/tools.php?page=custom-error-log8782.0428.3629.79

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=custom-error-log
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=custom-error-log
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=custom-error-log
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=custom-error-log
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-error-log/admin/admin.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-error-log/admin/admin-bar.php:111
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cel_get_all_logs() in wp-content/plugins/custom-error-log/admin/log-table.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-error-log/includes/functions.php:158
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-error-log/custom-error-log.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-error-log/admin/introduction.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Screenshots: Screenshot #1 (The error log page.) image missing
Please take inspiration from this readme.txt

custom-error-log/custom-error-log.php 92% from 13 tests

The main PHP script in "Custom Error Log" version 1.1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 194 characters long)

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
No dangerous file extensions were detected834 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6385185448
CSS24217168
JavaScript110338129
PO File1313189

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 compressed PNG file occupies 0.05MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png55.88KB54.53KB▼ 2.40%