62% audit-trail

Code Review | Audit Trail

WordPress plugin Audit Trail scored62%from 54 tests.

About plugin

  • Plugin page: audit-trail
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7
  • WordPress version: 6.3.1
  • First release: Sep 17, 2007
  • Latest release: Dec 11, 2016
  • Number of updates: 61
  • Update frequency: every 55.5 days
  • Top authors: johnny5 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10,000+ active /120,400 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Audit Trail
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.08 ▲0.45
Dashboard /wp-admin3.33 ▼0.0258.39 ▼0.34
Posts /wp-admin/edit.php3.44 ▲0.0943.79 ▼1.67
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.03 ▼9.01
Media Library /wp-admin/upload.php3.25 ▲0.0235.14 ▲2.68

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Audit Trail
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.17 ▼0.491.88 ▲0.3246.11 ▲5.94
Dashboard /wp-admin2,199 ▲255.62 ▼0.0197.56 ▲12.7347.15 ▲5.51
Posts /wp-admin/edit.php2,101 ▲12.00 ▲0.0633.76 ▼2.0234.93 ▼4.28
Add New Post /wp-admin/post-new.php1,531 ▲323.12 ▲0.35645.39 ▼29.6952.60 ▲2.08
Media Library /wp-admin/upload.php1,404 ▲74.26 ▲0.0895.91 ▼1.7443.66 ▼0.89
Audit Trail /wp-admin/audit-trail.php260.420.0714.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_audit_trail
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • audit_trail
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% 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 0% 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/audit-trail/view/admin/support.php
    • > /wp-content/plugins/audit-trail/csv.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/audit-trail/models/pager.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/audit-trail/audit-trail.php:302

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/audit-trail.php
    • > Network (severe)
    wp-admin/audit-trail.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Audit trail) image not found
You can take inspiration from this readme.txt

audit-trail/audit-trail.php Passed 13 tests

The main file in "Audit Trail" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
80 characters long description:
Keep a log of exactly what is happening behind the scenes of your WordPress blog

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected3,227 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PO File98821,0212,016
PHP173202401,076
CSS1290132
Markdown1103

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity29.20
▷ Minimum class complexity6.00
▷ Maximum class complexity74.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods80
▷ Static methods78.75%
▷ Public methods7492.50%
▷ Protected methods00.00%
▷ Private methods67.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/delete.png1.11KB1.01KB▼ 8.56%
screenshot-1.png6.65KB6.63KB0.29%
images/csv.png0.80KB0.93KB0.00%