68% wp-log-action

Code Review | WP Log Action

WordPress plugin WP Log Action scored68%from 54 tests.

About plugin

  • Plugin page: wp-log-action
  • Plugin version: 0.51
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Oct 4, 2016
  • Latest release: Jul 18, 2023
  • Number of updates: 34
  • Update frequency: every 72.9 days
  • Top authors: webheadllc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,532 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by WP Log Action
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0549.15 ▲8.17
Dashboard /wp-admin3.35 ▲0.0550.75 ▼7.75
Posts /wp-admin/edit.php3.40 ▲0.0545.44 ▼6.67
Add New Post /wp-admin/post-new.php5.93 ▲0.0584.99 ▼9.69
Media Library /wp-admin/upload.php3.27 ▲0.0536.75 ▲0.14
Logs /wp-admin/tools.php?page=wpla3.3234.85
WP Log Action /wp-admin/options-general.php?page=wpla-options3.2433.23

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: 1 new table, 6 new options
New tables
wp_wpla_logs
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

WP Log Action: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.37 ▲0.011.87 ▲0.1744.44 ▲0.13
Dashboard /wp-admin2,200 ▲205.55 ▼0.1585.48 ▼14.3539.20 ▼5.31
Posts /wp-admin/edit.php2,111 ▲112.04 ▲0.0335.63 ▼2.2133.82 ▼4.14
Add New Post /wp-admin/post-new.php1,547 ▼718.21 ▼0.14616.59 ▼19.5853.47 ▼0.71
Media Library /wp-admin/upload.php1,411 ▲144.27 ▲0.03104.53 ▲3.2144.60 ▼4.47
Logs /wp-admin/tools.php?page=wpla1,0972.3529.0833.17
WP Log Action /wp-admin/options-general.php?page=wpla-options9702.1826.7032.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-log-action/uninstall.php+7
    Constant WPLA_DIR already defined
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-log-action/options-page.php
    • > /wp-content/plugins/wp-log-action/wp-log-action.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-log-action/wpla-output-table.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-log-action/wpla-output-table.php on line 4
    • > PHP Warning
      require_once(WPLA_DIR/WPLA_Log_Level.php): failed to open stream: No such file or directory in wp-content/plugins/wp-log-action/WPLA_Logger.php on line 3
    • > PHP Warning
      Use of undefined constant WPLA_DIR - assumed 'WPLA_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-log-action/WPLA_Logger.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-log-action/wpla-output-table.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'WPLA_DIR/WPLA_Log_Level.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-log-action/WPLA_Logger.php on line 3

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: debug, warning, wp_debug, activity, log...

wp-log-action/wp-log-action.php Passed 13 tests

The main PHP script in "WP Log Action" version 0.51 is automatically included on every request by WordPress
62 characters long description:
Provides a common interface to log messages the WordPress way.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected909 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7165324867
CSS25036
JavaScript1006

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity24.00
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods39
▷ Static methods1230.77%
▷ Public methods3794.87%
▷ Protected methods00.00%
▷ Private methods25.13%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants746.67%
▷ Class constants853.33%
▷ Public constants8100.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