84% wp-ajax-audit

Code Review | WP-AJAX-Audit

WordPress plugin WP-AJAX-Audit scored84%from 54 tests.

About plugin

  • Plugin page: wp-ajax-audit
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 18, 2013
  • Latest release: Oct 18, 2013
  • Number of updates: 8
  • Update frequency: every 4.0 days
  • Top authors: david.kryzaniak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /851 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.67ms] Passed 4 tests

Analyzing server-side resources used by WP-AJAX-Audit
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.93 ▼7.61
Dashboard /wp-admin3.33 ▲0.0242.77 ▼5.70
Posts /wp-admin/edit.php3.38 ▲0.0247.57 ▲6.05
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.05 ▼22.29
Media Library /wp-admin/upload.php3.25 ▲0.0233.98 ▲0.91
WP AJAX Audit /wp-admin/tools.php?page=WPAjaxAudit3.2225.91

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
wp_ajax_audit_access_key
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

WP-AJAX-Audit: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.24 ▼1.031.77 ▼0.3040.21 ▼3.27
Dashboard /wp-admin2,210 ▲224.87 ▼0.95115.22 ▼2.0542.94 ▼4.10
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0037.03 ▼2.8335.20 ▼1.02
Add New Post /wp-admin/post-new.php1,517 ▼1117.40 ▼1.23665.43 ▲37.6453.13 ▲4.31
Media Library /wp-admin/upload.php1,389 ▼24.30 ▲0.0999.13 ▼0.1344.69 ▼1.28
WP AJAX Audit /wp-admin/tools.php?page=WPAjaxAudit7842.1725.6338.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-ajax-audit/audit.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: ajax, security, ajax audit, audit

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

The principal PHP file in "WP-AJAX-Audit" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-ajax-audit.php" instead of "audit.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
No dangerous file extensions were detected114 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13657114

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin