78% rundiz-downloads

Code Review | Rundiz Downloads

WordPress plugin Rundiz Downloads scored78%from 54 tests.

About plugin

  • Plugin page: rundiz-downloads
  • Plugin version: 1.0.11
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 24, 2018
  • Latest release: Dec 20, 2022
  • Number of updates: 26
  • Update frequency: every 56.0 days
  • Top authors: okvee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,103 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
This plugin's installer ran successfully

Server metrics [RAM: ▲1.43MB] [CPU: ▲2.16ms] Passed 4 tests

This is a short check of server-side resources used by Rundiz Downloads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.61 ▲1.1530.54 ▼7.25
Dashboard /wp-admin4.86 ▲1.5555.91 ▼0.16
Posts /wp-admin/edit.php4.94 ▲1.5860.32 ▲12.67
Add New Post /wp-admin/post-new.php7.43 ▲1.5596.81 ▲3.45
Media Library /wp-admin/upload.php4.71 ▲1.4846.81 ▲12.59
Add New /wp-admin/admin.php?page=rd-downloads_add4.7542.72
Downloads /wp-admin/admin.php?page=rd-downloads5.1346.05
/wp-admin/admin.php?page=rd-downloads_edit4.8042.08
Settings /wp-admin/admin.php?page=rd-downloads_settings4.9842.57
Logs /wp-admin/admin.php?page=rd-downloads_logs5.0647.53

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 233 new files
Database: 2 new tables, 7 new options
New tables
wp_rd_download_logs
wp_rd_downloads
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
rd_downloads_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Rundiz Downloads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲18515.30 ▲0.959.05 ▲7.4138.50 ▲2.05
Dashboard /wp-admin2,342 ▲1685.97 ▲0.35176.57 ▲92.4551.06 ▲4.70
Posts /wp-admin/edit.php2,237 ▲1341.99 ▼0.0439.72 ▼4.6536.18 ▼4.02
Add New Post /wp-admin/post-new.php1,679 ▲15323.01 ▼0.10661.89 ▼50.7360.55 ▲9.34
Media Library /wp-admin/upload.php1,428 ▲284.18 ▼0.01103.39 ▼0.8157.05 ▲10.15
Add New /wp-admin/admin.php?page=rd-downloads_add1,2101.9231.7244.27
Downloads /wp-admin/admin.php?page=rd-downloads1,2841.9026.8539.33
/wp-admin/admin.php?page=rd-downloads_edit7891.516.5815.57
Settings /wp-admin/admin.php?page=rd-downloads_settings1,5543.1761.7737.24
Logs /wp-admin/admin.php?page=rd-downloads_logs1,0861.7125.6525.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 68× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Trait 'RdDownloads\\App\\AppTrait' not found in wp-content/plugins/rundiz-downloads/App/Libraries/Loader.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'RdDownloads\\App\\Models\\WPListTable' not found in wp-content/plugins/rundiz-downloads/App/Models/RdDownloadLogsListTable.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'RdDownloads\\App\\Controllers\\ControllerInterface' not found in wp-content/plugins/rundiz-downloads/App/Controllers/Front/EnqueueCss.php:12
    • > PHP Fatal error
      Trait 'RdDownloads\\App\\AppTrait' not found in wp-content/plugins/rundiz-downloads/App/Controllers/Admin/Downloads/GithubOAuth.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/rundiz-downloads/App/Views/admin/Downloads/Management/helpTab/shortcodes_v.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'RdDownloads\\App\\Controllers\\ControllerInterface' not found in wp-content/plugins/rundiz-downloads/App/Controllers/Front/Hooks/WpLogout.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'RdDownloads\\Rundiz\\SimpleCache\\SimpleCacheInterface' not found in wp-content/plugins/rundiz-downloads/vendor/simple-cache/Rundiz/SimpleCache/Drivers/Memcache.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'RdDownloads\\App\\Controllers\\ControllerInterface' not found in wp-content/plugins/rundiz-downloads/App/Controllers/Front/Hooks/Query/GithubAutoUpdatePage.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'RdDownloads\\App\\Controllers\\ControllerInterface' not found in wp-content/plugins/rundiz-downloads/App/Controllers/Admin/Downloads/Logs.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'RdDownloads\\Rundiz\\SimpleCache\\SimpleCacheInterface' not found in wp-content/plugins/rundiz-downloads/vendor/simple-cache/Rundiz/SimpleCache/Drivers/Apc.php:21

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rd-downloads_settings
    • > Console-api (warning) in wp-content/plugins/rundiz-downloads/assets/js/ace/ace.js?ver=1.2.3-minnoconflict+0:51452
    Automatically scrolling cursor into view after selection change" "this will be disabled in the next version" "set editor.$blockScrolling = Infinity to disable this message

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: file hosting, download, downloads, download manager, github

rundiz-downloads/rd-downloads.php 77% from 13 tests

The principal PHP file in "Rundiz Downloads" v. 1.0.11 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("/App/languages/")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rundiz-downloads.php" instead of "rd-downloads.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected20,799 lines of code in 182 files:
LanguageFilesBlank linesComment linesLines of code
PHP1012,4074,55910,212
SVG30124,479
CSS131,448373,316
JavaScript574264971,763
PO File1317439719
Markdown4880229
JSON20081
HTML1100

PHP code Passed 2 tests

An short overview of 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.47
Average class complexity26.84
▷ Minimum class complexity1.00
▷ Maximum class complexity220.00
Average method complexity5.68
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces25
Interfaces4
Traits1
Classes68
▷ Abstract classes34.41%
▷ Concrete classes6595.59%
▷ Final classes00.00%
Methods404
▷ Static methods266.44%
▷ Public methods30976.49%
▷ Protected methods6215.35%
▷ Private methods338.17%
Functions11
▷ Named functions00.00%
▷ Anonymous functions11100.00%
Constants10
▷ Global constants220.00%
▷ Class constants880.00%
▷ Public constants8100.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 images were found in this plugin