10% wp-admin-audit

Code Review | WP Admin Audit

WordPress plugin WP Admin Audit scored10%from 54 tests.

About plugin

  • Plugin page: wp-admin-audit
  • Plugin version: 1.2.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Feb 1, 2022
  • Latest release: Nov 14, 2023
  • Number of updates: 39
  • Update frequency: every 16.7 days
  • Top authors: brandtoss (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /2,497 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/wp-admin-audit/classes/Application/Settings.php+902
    Uncaught Error: Class 'IntlDateFormatter' not found in wp-content/plugins/wp-admin-audit/classes/Application/Settings.php:902
    Stack trace:
    #0 wp-content/plugins/wp-admin-audit/classes/Application/Settings.php(877): WADA_Settings::getDateFormatForDateOnlySelectOptions()
    #1 wp-content/plugins/wp-admin-audit/classes/Setup.php(359): WADA_Settings::setDateFormatForDateOnly()
    #2 wp-content/plugins/wp-admin-audit/classes/Setup.php(82): WADA_Setup->setupStandardSettingsIfNeeded()
    #3 wp-content/plugins/wp-admin-audit/classes/Setup.php(72): WADA_Setup->setupInitialDatabaseIfNeeded()
    #4 wp-content/plugins/wp-admin-audit/wp-admin-audit.php(235): WADA_Setup->installOrUpdate()
    #5 wp-includes/class-wp-hook.php(310): WpAdminAudit->installWADA()
    #6 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #7 wp-includes/plugin.php(517): WP_Hook->do_action

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.93ms] Passed 4 tests

A check of server-side resources used by WP Admin Audit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.86 ▼5.30
Dashboard /wp-admin3.31 ▼0.0447.15 ▼13.82
Posts /wp-admin/edit.php3.36 ▲0.0045.69 ▼1.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.66 ▼15.31
Media Library /wp-admin/upload.php3.23 ▲0.0034.38 ▲1.39

Server storage [IO: ▲2.10MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 177 new files
Database: 16 new tables, 6 new options
New tables
wp_wada_notifications
wp_wada_sensor_options
wp_wada_logins
wp_wada_event_notifications
wp_wada_notification_queue_map
wp_wada_event_infos
wp_wada_notification_queue
wp_wada_notification_triggers
wp_wada_sensors
wp_wada_event_notification_log
...
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Admin Audit
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.29 ▼0.101.67 ▼0.0442.40 ▼4.93
Dashboard /wp-admin2,195 ▲155.58 ▼0.0790.36 ▼2.4839.63 ▼1.17
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0439.38 ▼0.6235.49 ▲2.03
Add New Post /wp-admin/post-new.php1,526 ▼523.05 ▲0.14599.53 ▼72.2848.08 ▼11.36
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.11102.38 ▲2.8343.44 ▲1.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 16 tables in the database
    • wp_wada_settings
    • wp_wada_users
    • wp_wada_event_infos
    • wp_wada_extensions
    • wp_wada_event_notifications
    • wp_wada_logins
    • wp_wada_notification_queue_map
    • wp_wada_notification_triggers
    • wp_wada_events
    • wp_wada_event_notification_log
    • ...
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'GorHill\\FineDiff\\FineDiffOp' not found in wp-content/plugins/wp-admin-audit/classes/Lib/PHP-FineDiff-multibyte/GorHill/FineDiff/FineDiffCopyOp.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'GorHill\\FineDiff\\FineDiffOp' not found in wp-content/plugins/wp-admin-audit/classes/Lib/PHP-FineDiff-multibyte/GorHill/FineDiff/FineDiffDeleteOp.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'GorHill\\FineDiff\\FineDiffOp' not found in wp-content/plugins/wp-admin-audit/classes/Lib/PHP-FineDiff-multibyte/GorHill/FineDiff/FineDiffReplaceOp.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'GorHill\\FineDiff\\FineDiff' not found in wp-content/plugins/wp-admin-audit/classes/Lib/PHP-FineDiff-multibyte/GorHill/FineDiff/FineDiffHTML.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GorHill\\FineDiff\\FineDiffOp' not found in wp-content/plugins/wp-admin-audit/classes/Lib/PHP-FineDiff-multibyte/GorHill/FineDiff/FineDiffInsertOp.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/wp-admin-audit/wp-admin-audit.php:245

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: security event log, security audit log, security incident log, admin activity report, wordpress admin tracking...

wp-admin-audit/wp-admin-audit.php 92% from 13 tests

The principal PHP file in "WP Admin Audit" v. 1.2.8 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 177 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin27,815 lines of code in 143 files:
LanguageFilesBlank linesComment linesLines of code
PHP1302,4132,30320,552
PO File32,4023,0024,849
CSS6311401,663
JavaScript318470750
HTML1011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity22.09
▷ Minimum class complexity1.00
▷ Maximum class complexity135.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces1
Interfaces3
Traits2
Classes124
▷ Abstract classes97.26%
▷ Concrete classes11592.74%
▷ Final classes00.00%
Methods1,121
▷ Static methods39435.15%
▷ Public methods76968.60%
▷ Protected methods35131.31%
▷ Private methods10.09%
Functions25
▷ Named functions28.00%
▷ Anonymous functions2392.00%
Constants304
▷ Global constants00.00%
▷ Class constants304100.00%
▷ Public constants304100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/screens/notification_add_step03.png32.13KB18.65KB▼ 41.96%
assets/img/screens/notification_add_step04.png45.54KB25.42KB▼ 44.18%
assets/img/logo_small.png5.07KB5.57KB0.00%
assets/img/screens/notification_add_step01.png19.62KB11.84KB▼ 39.64%
assets/img/screens/notification_add_step02.png24.37KB14.41KB▼ 40.87%