72% wpaudit

Code Review | WordPress Audit

WordPress plugin WordPress Audit scored72%from 54 tests.

About plugin

  • Plugin page: wpaudit
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 5, 2019
  • Latest release: Sep 20, 2019
  • Number of updates: 11
  • Update frequency: every 2.0 days
  • Top authors: gpwebdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /581 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼12.95ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Audit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3246.43 ▲3.31
Dashboard /wp-admin3.42 ▲0.1236.64 ▼13.87
Posts /wp-admin/edit.php3.50 ▲0.1440.40 ▼29.01
Add New Post /wp-admin/post-new.php5.73 ▼0.1677.80 ▼12.24
Media Library /wp-admin/upload.php3.44 ▲0.2136.92 ▲4.45
WP Audit /wp-admin/options-general.php?page=wp-audit3.4135.59

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Audit
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.20 ▼1.181.59 ▼0.2342.85 ▼4.00
Dashboard /wp-admin2,217 ▲294.85 ▼1.0199.95 ▼16.0139.05 ▼5.35
Posts /wp-admin/edit.php2,100 ▲82.05 ▲0.0639.54 ▼2.2433.72 ▼0.36
Add New Post /wp-admin/post-new.php1,528 ▼023.19 ▲5.10675.01 ▲74.9854.52 ▼1.98
Media Library /wp-admin/upload.php1,393 ▲54.20 ▲0.02100.27 ▲4.3942.38 ▲0.05
WP Audit /wp-admin/options-general.php?page=wp-audit8462.0625.6427.08

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wp-audit
    • > Warning in wp-content/plugins/wpaudit/index.php+93
    filemtime(): stat failed for wp-content/plugins/wpaudit//assets/css/plugin-admin.css
    • > GET request to /wp-admin/options-general.php?page=wp-audit
    • > Warning in wp-content/plugins/wpaudit/index.php+101
    filemtime(): stat failed for wp-content/plugins/wpaudit//assets/js/plugin-admin.js

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/wpaudit/vendor/wp-background-processing/classes/wp-background-process.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpaudit/vendor/wp-background-processing/wp-background-processing.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=wp-audit
    • > Network (severe)
    wp-content/plugins/wpaudit/assets/css/plugin-admin.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=wp-audit
    • > Network (severe)
    wp-content/plugins/wpaudit/assets/js/plugin-admin.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI ("")
  • Tags: There are too many tags (16 tag instead of maximum 10)
You can take inspiration from this readme.txt

wpaudit/index.php 85% from 13 tests

Analyzing the main PHP file in "WordPress Audit" version 1.0.4
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpaudit.php" instead of "index.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected3,329 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP255348532,404
JavaScript2629281519
Bourne Shell12827142
JSON500135
Markdown2540106
YAML10223

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.67
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes24
▷ Abstract classes28.33%
▷ Concrete classes2291.67%
▷ Final classes00.00%
Methods115
▷ Static methods00.00%
▷ Public methods9582.61%
▷ Protected methods2017.39%
▷ Private methods00.00%
Functions30
▷ Named functions00.00%
▷ Anonymous functions30100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin