77% wp-auto-updates

Code Review | WP Auto Updates

WordPress plugin WP Auto Updates scored77%from 54 tests.

About plugin

  • Plugin page: wp-auto-updates
  • Plugin version: 0.5.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.7
  • WordPress version: 6.3.1
  • First release: Jun 12, 2020
  • Latest release: Mar 11, 2021
  • Number of updates: 14
  • Update frequency: every 19.6 days
  • Top authors: icelayer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,334 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
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.13ms] Passed 4 tests

This is a short check of server-side resources used by WP Auto Updates
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1139.00 ▲0.88
Dashboard /wp-admin3.42 ▲0.0748.36 ▼16.84
Posts /wp-admin/edit.php3.53 ▲0.1751.33 ▲1.83
Add New Post /wp-admin/post-new.php6.00 ▲0.1194.83 ▼10.01
Media Library /wp-admin/upload.php3.34 ▲0.1137.27 ▲1.46

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Auto Updates
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.31 ▼0.061.82 ▼0.3842.85 ▲3.36
Dashboard /wp-admin2,210 ▲305.64 ▼0.0695.12 ▲3.3842.03 ▼6.74
Posts /wp-admin/edit.php2,118 ▲212.05 ▲0.0439.47 ▲1.6435.88 ▼0.96
Add New Post /wp-admin/post-new.php1,564 ▲1918.49 ▼4.94623.81 ▼53.7663.14 ▲8.56
Media Library /wp-admin/upload.php1,415 ▲154.23 ▲0.02103.55 ▼10.8043.38 ▼4.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-auto-updates/src/Admin/pages/enable-wp-auto-updates/update-logs.admin.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-auto-updates/src/Admin/pages/enable-wp-auto-updates/enable-wp-auto-updates.admin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPAutoUpdates\\WPAdminPage\\AdminPage' not found in wp-content/plugins/wp-auto-updates/src/Admin/AutoUpdatesAdmin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/wp-auto-updates/src/WPAdminPage/pages/header.admin.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-auto-updates/src/WPAdminPage/pages/footer.admin.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Auto Updates Settings) image required
You can take inspiration from this readme.txt

wp-auto-updates/wp-auto-update.php 69% from 13 tests

The principal PHP file in "WP Auto Updates" v. 0.5.4 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-auto-updates.php" instead of "wp-auto-update.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.7" instead of "3.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,453 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP17218714968
Markdown2780350
CSS1152129
HTML5005
JSON1001

PHP code Passed 2 tests

This is a very shot 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.21
Average class complexity12.29
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes350.00%
Methods72
▷ Static methods1216.67%
▷ Public methods6995.83%
▷ Protected methods00.00%
▷ Private methods34.17%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin