74% wp-data-logger

Code Review | WP Logger

WordPress plugin WP Logger scored74%from 54 tests.

About plugin

  • Plugin page: wp-data-logger
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Sep 2, 2018
  • Latest release: Sep 20, 2020
  • Number of updates: 16
  • Update frequency: every 46.8 days
  • Top authors: hokku (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /2,845 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.66ms] Passed 4 tests

Server-side resources used by WP Logger
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1841.18 ▼3.41
Dashboard /wp-admin3.36 ▲0.0150.77 ▼16.43
Posts /wp-admin/edit.php3.48 ▲0.1154.78 ▲7.34
Add New Post /wp-admin/post-new.php5.94 ▲0.05101.79 ▲6.32
Media Library /wp-admin/upload.php3.28 ▲0.0537.50 ▼1.12
WP Logger /wp-admin/tools.php?page=logger3.2534.04

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: 1 new table, 6 new options
New tables
wp_data_logger
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Logger
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.34 ▲0.111.71 ▼0.3645.37 ▲2.18
Dashboard /wp-admin2,202 ▲255.57 ▲0.0489.88 ▼2.0941.09 ▲0.80
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0439.34 ▲3.5434.53 ▼1.66
Add New Post /wp-admin/post-new.php1,534 ▼123.26 ▲5.00627.99 ▼22.9858.34 ▼19.01
Media Library /wp-admin/upload.php1,395 ▼54.17 ▼0.0197.14 ▼29.4344.98 ▲0.20
WP Logger /wp-admin/tools.php?page=logger7841.9924.7929.10

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Zombie tables were found after uninstall: 1 table
    • wp_data_logger
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-data-logger/wp-data-logger.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: develop, log, data logger, logger, debug...

wp-data-logger/wp-data-logger.php Passed 13 tests

"WP Logger" version 2.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
109 characters long description:
Logging and debug events and vars on site. For adding data in log use the hook: do_action( 'logger', $data );

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected291 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25113286
Markdown1505

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin