88% vw-notes-files-downloader

Code Review | VW Notes & Files Downloader

WordPress plugin VW Notes & Files Downloader scored 88% from 54 tests.

About plugin

  • Plugin page: vw-notes-files-do...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 5.8.1
  • First release: Apr 13, 2018
  • Latest release: Sep 9, 2021
  • Number of updates: 12
  • Update frequency: every 104.0 days
  • Top authors: vowelweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,540 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼138.06ms] Passed 4 tests

This is a short check of server-side resources used by VW Notes & Files Downloader
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.1044.24 ▲8.03
Dashboard /wp-admin3.16 ▲0.1046.91 ▲1.51
Posts /wp-admin/edit.php3.21 ▲0.1044.84 ▲9.73
Add New Post /wp-admin/post-new.php5.51 ▲0.0785.86 ▼564.85
Media Library /wp-admin/upload.php3.10 ▲0.1033.86 ▲3.09
Notes & Files /wp-admin/edit.php?post_type=vnafdnotes3.1437.92
Add New /wp-admin/post-new.php?post_type=vnafdnotes3.1141.99

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for VW Notes & Files Downloader
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,833 ▲23715.93 ▲0.4411.89 ▲2.1858.33 ▲6.65
Dashboard /wp-admin3,091 ▲1606.19 ▲0.24136.31 ▼7.8155.85 ▼57.21
Posts /wp-admin/edit.php2,803 ▲642.70 ▲0.0064.98 ▼0.2744.32 ▼44.56
Add New Post /wp-admin/post-new.php1,725 ▲22518.36 ▼0.26348.50 ▼26.3896.92 ▼12.63
Media Library /wp-admin/upload.php1,871 ▲615.02 ▼0.01146.83 ▲3.36108.35 ▼10.20
Notes & Files /wp-admin/edit.php?post_type=vnafdnotes1,4702.6265.6444.07
Add New /wp-admin/post-new.php?post_type=vnafdnotes2,0103.27117.3549.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=vnafdnotes
    • > Warning in wp-content/plugins/vw-notes-files-downloader/notes.php+65
    count(): Parameter must be an array or an object that implements Countable

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vw-notes-files-downloader/dashboard.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vw-notes-files-downloader/notes.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vw-notes-files-downloader/add-tabs.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/vw-notes-files-downloader/downloader.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: download notes, assigment downloader, student notes downloader, staff files downloader, notes...

vw-notes-files-downloader/index.php 85% from 13 tests

"VW Notes & Files Downloader" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("vw-notes-files-downloader.php" instead of "index.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin595 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP697121356
CSS253214
JavaScript1161125

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity5.20
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
5 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/notes-display.png11.74KB4.85KB▼ 58.70%
images/shortcode.png45.87KB17.13KB▼ 62.66%
images/Download-Files.png60.02KB18.94KB▼ 68.45%
images/notes-files.png38.41KB14.80KB▼ 61.47%
images/final-logo.png9.72KB3.95KB▼ 59.33%