84% simple-downloads-list

Code Review | Simple Downloads List

WordPress plugin Simple Downloads List scored84%from 54 tests.

About plugin

  • Plugin page: simple-downloads-...
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.2
  • WordPress version: 6.3.1
  • First release: May 24, 2022
  • Latest release: Apr 14, 2023
  • Number of updates: 44
  • Update frequency: every 7.4 days
  • Top authors: neofix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /903 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Simple Downloads List
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.91 ▼3.83
Dashboard /wp-admin3.32 ▼0.0248.76 ▼16.16
Posts /wp-admin/edit.php3.37 ▲0.0248.64 ▲1.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.23 ▼15.43
Media Library /wp-admin/upload.php3.24 ▲0.0238.94 ▲1.56

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 41 new files
Database: 1 new table, 6 new options
New tables
wp_neofix_sdl
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Simple Downloads List
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲8713.34 ▼1.024.32 ▲2.5444.07 ▲3.99
Dashboard /wp-admin2,237 ▲345.86 ▼0.0198.72 ▼2.5337.50 ▼8.26
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0133.25 ▼3.8535.35 ▼1.54
Add New Post /wp-admin/post-new.php1,565 ▲2023.46 ▲0.30652.96 ▼18.0461.77 ▲2.07
Media Library /wp-admin/upload.php1,419 ▲194.26 ▼0.0296.07 ▼19.4142.59 ▼2.99

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 6× 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/simple-downloads-list/admin/adminpanel_v2.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-downloads-list/neofix_sdl.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-downloads-list/setup/setup.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_media() in wp-content/plugins/simple-downloads-list/admin/render_adminpanel.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-downloads-list/lists/list_1/download_list_1.php:2
    • > PHP Warning
      Use of undefined constant NEOFIX_SDL_PATH_LOCAL - assumed 'NEOFIX_SDL_PATH_LOCAL' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-downloads-list/setup/setup.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: table, attachments, downloads, list, files...

simple-downloads-list/neofix_sdl.php 92% from 13 tests

The entry point to "Simple Downloads List" version 1.4.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-downloads-list.php" instead of "neofix_sdl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin21,300 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS81,4885013,124
JavaScript72,0711,5627,884
PHP55125292

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.00
▷ Minimum class complexity2.00
▷ Maximum class complexity12.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods321.43%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.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
No PNG files were detected