10% avenirsoft-directdownload

Code Review | Avenir-soft Direct Download

WordPress plugin Avenir-soft Direct Download scored10%from 54 tests.

About plugin

  • Plugin page: avenirsoft-direct...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Jan 8, 2015
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: Sahil-Ahlawat (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,321 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/avenirsoft-directdownload/index.php+13
    Use of undefined constant PLUGIN_CSS_FILE - assumed 'PLUGIN_CSS_FILE' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.79ms] Passed 4 tests

This is a short check of server-side resources used by Avenir-soft Direct Download
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.26 ▼32.58
Dashboard /wp-admin2.05 ▼1.265.31 ▼42.57
Posts /wp-admin/edit.php2.05 ▼1.314.91 ▼40.26
Add New Post /wp-admin/post-new.php2.05 ▼3.845.45 ▼99.76
Media Library /wp-admin/upload.php2.05 ▼1.185.51 ▼26.90

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

A short overview of filesystem and database impact
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_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Avenir-soft Direct Download
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.73 ▲0.381.63 ▲0.0538.34 ▲0.69
Dashboard /wp-admin2,215 ▲355.56 ▼0.0883.58 ▼6.2268.47 ▲19.32
Posts /wp-admin/edit.php2,114 ▲111.99 ▲0.0034.12 ▼0.6234.26 ▼2.11
Add New Post /wp-admin/post-new.php1,541 ▲1523.20 ▲0.38661.10 ▲4.1556.66 ▲3.77
Media Library /wp-admin/upload.php1,417 ▲144.18 ▼0.0194.62 ▼6.7075.74 ▲31.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/avenirsoft-directdownload/index.php+13
    Use of undefined constant PLUGIN_CSS_FILE - assumed 'PLUGIN_CSS_FILE' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant PLUGIN_CSS_FILE - assumed 'PLUGIN_CSS_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/avenirsoft-directdownload/index.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/avenirsoft-directdownload/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #3 (A product View.)
You can look at the official readme.txt

avenirsoft-directdownload/index.php 92% from 13 tests

The principal PHP file in "Avenir-soft Direct Download" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("avenirsoft-directdownload.php" instead of "index.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 detected70 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP151366
CSS1004

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions5
▷ Named functions5100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/menu.png2.20KB1.32KB▼ 40.08%
admin/images/avenirlogonew.png9.40KB6.50KB▼ 30.87%