10% mw-auto-download

Code Review | Auto download by Michael Willems

WordPress plugin Auto download by Michael Willems scored10%from 54 tests.

About plugin

  • Plugin page: mw-auto-download
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: Jun 18, 2021
  • Latest release: Aug 1, 2021
  • Number of updates: 7
  • Update frequency: every 6.4 days
  • Top authors: bightbv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /513 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/mw-auto-download/includes/mwadwp-functions.php+53
    Trying to access array offset on value of type bool

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

Server-side resources used by Auto download by Michael Willems
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.43 ▼6.03
Dashboard /wp-admin3.32 ▲0.0245.63 ▼4.85
Posts /wp-admin/edit.php3.37 ▲0.0145.56 ▼9.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.29 ▼11.63
Media Library /wp-admin/upload.php3.24 ▲0.0133.51 ▲1.83
Auto download /wp-admin/options-general.php?page=mwadwp-auto-download3.2130.93

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Auto download by Michael Willems
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲5413.58 ▼0.622.12 ▲0.0936.87 ▼14.65
Dashboard /wp-admin2,213 ▲254.86 ▼0.04108.61 ▲0.9545.85 ▲2.05
Posts /wp-admin/edit.php2,099 ▲132.06 ▲0.0439.78 ▼0.1833.81 ▼4.36
Add New Post /wp-admin/post-new.php1,553 ▲3318.28 ▼4.92622.72 ▲25.5176.64 ▲24.46
Media Library /wp-admin/upload.php1,395 ▲74.25 ▲0.0395.84 ▲0.8639.54 ▼2.22
Auto download /wp-admin/options-general.php?page=mwadwp-auto-download8992.1925.9048.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mwadwp-auto-download
    • > Warning in wp-content/plugins/mw-auto-download/includes/mwadwp-admin.php+24
    in_array() expects parameter 2 to be array, string given
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mwadwp-auto-download
    • > Notice in wp-content/plugins/mw-auto-download/includes/mwadwp-functions.php+85
    Undefined index: mw_debug
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mwadwp-auto-download
    • > Notice in wp-content/plugins/mw-auto-download/includes/mwadwp-admin.php+41
    Undefined offset: 2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mwadwp-auto-download
    • > Notice in wp-content/plugins/mw-auto-download/includes/mwadwp-admin.php+41
    Trying to access array offset on value of type null

SRP 0% 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mw-auto-download/includes/mwadwp-script.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mw-auto-download/includes/mwadwp-admin.php:64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mw-auto-download/includes/mwadwp-functions.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 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
These attributes need your attention:
  • Contributors: Contributors not specified
  • Requires php: Version not formatted correctly
  • Requires at least: Version not formatted correctly
Please take inspiration from this readme.txt

mw-auto-download/auto-download.php 92% from 13 tests

The main PHP file in "Auto download by Michael Willems" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mw-auto-download.php" instead of "auto-download.php")

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
No dangerous file extensions were detected266 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP53238239
CSS14027

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected