84% plain-logger

Code Review | Plain Logger

WordPress plugin Plain Logger scored 84% from 54 tests.

About plugin

  • Plugin page: plain-logger
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7
  • WordPress version: 6.3.1
  • First release: Jan 29, 2017
  • Latest release: Aug 22, 2017
  • Number of updates: 9
  • Update frequency: every 22.4 days
  • Top authors: hxh90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 711 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
Install script ran successfully

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

Analyzing server-side resources used by Plain Logger
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.53 ▼3.25
Dashboard /wp-admin3.35 ▲0.0543.76 ▼0.55
Posts /wp-admin/edit.php3.46 ▲0.1145.77 ▼3.96
Add New Post /wp-admin/post-new.php5.95 ▲0.0790.28 ▼4.56
Media Library /wp-admin/upload.php3.27 ▲0.0533.70 ▲1.32
Plain Logger /wp-admin/tools.php?page=plain_logger3.2431.08

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Plain Logger
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7613.20 ▼1.191.83 ▼0.2337.62 ▼8.64
Dashboard /wp-admin2,208 ▲205.87 ▲1.01104.71 ▼6.1840.48 ▼6.76
Posts /wp-admin/edit.php2,097 ▲82.03 ▼0.0140.98 ▲0.2034.18 ▼1.74
Add New Post /wp-admin/post-new.php1,521 ▼723.51 ▲5.31567.92 ▼46.3355.30 ▼3.60
Media Library /wp-admin/upload.php1,393 ▲114.27 ▲0.0999.43 ▲1.2540.60 ▼3.19
Plain Logger /wp-admin/tools.php?page=plain_logger8172.0525.5030.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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Interface 'Logger' not found in wp-content/plugins/plain-logger/inc/class-log-to-db.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plain-logger/admin/setting-page.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'Logger' not found in wp-content/plugins/plain-logger/inc/class-log-to-file.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Log_to_File' not found in wp-content/plugins/plain-logger/class-plain-logger.php:11

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 on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (43 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

plain-logger/plain-logger.php Passed 13 tests

The primary PHP file in "Plain Logger" version 1.1.2 is used by WordPress to initiate all plugin functionality
102 characters long description:
Easily log any event on your WordPress site to text file. When simple echo and var_dump just won't do.

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 detected266 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP77535212
JavaScript15242
CSS12012

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods1770.83%
▷ Protected methods14.17%
▷ Private methods625.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin