84% automatic-updates

Code Review | Automatic Updates

WordPress plugin Automatic Updates scored84%from 54 tests.

About plugin

  • Plugin page: automatic-updates
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.2.3
  • WordPress version: 6.3.1
  • First release: Apr 4, 2019
  • Latest release: Sep 23, 2019
  • Number of updates: 18
  • Update frequency: every 9.6 days
  • Top authors: thapa.laxman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /945 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by Automatic Updates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.26 ▼6.63
Dashboard /wp-admin3.32 ▲0.0248.23 ▼2.88
Posts /wp-admin/edit.php3.37 ▲0.0154.75 ▲3.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0199.43 ▼1.61
Media Library /wp-admin/upload.php3.24 ▲0.0137.74 ▼1.30

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Automatic Updates
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲4513.24 ▼1.184.73 ▲2.6441.42 ▼3.14
Dashboard /wp-admin2,237 ▲345.08 ▲0.19108.13 ▲5.1643.08 ▼4.38
Posts /wp-admin/edit.php2,116 ▲162.04 ▼0.0241.36 ▼4.7439.97 ▼1.08
Add New Post /wp-admin/post-new.php1,544 ▼623.17 ▲0.20660.94 ▲54.8352.43 ▲3.76
Media Library /wp-admin/upload.php1,416 ▲164.22 ▲0.01100.66 ▼6.1143.90 ▼4.28

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
Please take a closer look at the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/automatic-updates/inc/form.php on line 34
    • > PHP Notice
      Undefined variable: plugins in wp-content/plugins/automatic-updates/inc/form.php on line 34
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/automatic-updates/inc/form.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/automatic-updates/automatic-updates.php:18
    • > PHP Notice
      Undefined variable: isNotificationEnabled in wp-content/plugins/automatic-updates/inc/form.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/automatic-updates/inc/form.php:78
    • > PHP Notice
      Undefined variable: coreUpdateTypes in wp-content/plugins/automatic-updates/inc/form.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: automatic-updates, update-plugins

automatic-updates/automatic-updates.php Passed 13 tests

The main PHP script in "Automatic Updates" version 1.3.3 is automatically included on every request by WordPress
78 characters long description:
This plugin allows admin to update the code wordpress & plugins in background.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected300 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP46043300

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity5.00
▷ Minimum class complexity3.00
▷ Maximum class complexity7.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods19.09%
▷ Private methods00.00%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin