10% wp-activity-logger

Code Review | WP Activity Logger

WordPress plugin WP Activity Logger scored10%from 54 tests.

About plugin

  • Plugin page: wp-activity-logger
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Apr 10, 2013
  • Latest release: Apr 10, 2013
  • Number of updates: 2
  • Update frequency: every 16.5 days
  • Top authors: numis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /685 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Error in wp-content/plugins/wp-activity-logger/WPActivityLogger.php+59
    Uncaught ArgumentCountError: Too few arguments to function WPActivityLogger::log_activation(), 1 passed in wp-includes/class-wp-hook.php on line 312 and exactly 2 expected in wp-content/plugins/wp-activity-logger/WPActivityLogger.php:59
    Stack trace:
    #0 wp-includes/class-wp-hook.php(312): WPActivityLogger->log_activation()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(720): do_action()

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.43ms] Passed 4 tests

Analyzing server-side resources used by WP Activity Logger
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0240.57 ▼3.82
Dashboard /wp-admin3.37 ▲0.0350.09 ▼1.50
Posts /wp-admin/edit.php3.49 ▲0.0950.07 ▲0.19
Add New Post /wp-admin/post-new.php5.96 ▲0.0385.65 ▼24.59
Media Library /wp-admin/upload.php3.30 ▲0.0337.96 ▲4.05
WP Activity Logger /wp-admin/options-general.php?page=WPActivityLogger3.2635.11

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Activity Logger: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.71 ▲0.341.87 ▲0.0444.43 ▲0.98
Dashboard /wp-admin2,196 ▲195.63 ▼0.0595.41 ▲7.2941.31 ▼2.68
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0436.32 ▼1.1833.79 ▼4.55
Add New Post /wp-admin/post-new.php1,530 ▲423.23 ▼0.27671.99 ▼58.4456.62 ▲0.96
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.01104.64 ▼1.2846.85 ▲3.37
WP Activity Logger /wp-admin/options-general.php?page=WPActivityLogger7912.0327.4128.98

Uninstaller [IO: ▲0.01MB] [DB: ▲0.00MB] 25% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Error in wp-content/plugins/wp-activity-logger/WPActivityLogger.php+63
    Uncaught ArgumentCountError: Too few arguments to function WPActivityLogger::log_deactivation(), 1 passed in wp-includes/class-wp-hook.php on line 312 and exactly 2 expected in wp-content/plugins/wp-activity-logger/WPActivityLogger.php:63
    Stack trace:
    #0 wp-includes/class-wp-hook.php(312): WPActivityLogger->log_deactivation()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(830): do_action()
  • This plugin has failed uninstalling correctly, leaving 3 files (0.01MB) in the plugin directory
    • (new file) WPActivityLogger.php
    • (new file) readme.txt
    • (new file) templates/admin_page.html.php
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • recovery_mode_email_last_sent

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/options-general.php?page=WPActivityLogger
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=WPActivityLogger
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=WPActivityLogger
    • > Warning in wp-admin/includes/template.php+1771
    call_user_func() expects parameter 1 to be a valid callback, class 'WPActivityLogger' does not have a method 'section_info'
    • > GET request to /wp-admin/options-general.php?page=WPActivityLogger
    • > Notice in wp-content/plugins/wp-activity-logger/WPActivityLogger.php+140
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/wp-activity-logger/templates/admin_page.html.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/wp-activity-logger/WPActivityLogger.php:39

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
4 plugin tags: plugin, security, admin, notification

wp-activity-logger/WPActivityLogger.php 92% from 13 tests

"WP Activity Logger" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-activity-logger.php" instead of "WPActivityLogger.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
Success! There were no dangerous files found in this plugin91 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2305291

PHP code Passed 2 tests

A brief analysis 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.12
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods18.33%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin