89% download-postpage-link

Code Review | Download-Post/Page Link

WordPress plugin Download-Post/Page Link scored89%from 54 tests.

About plugin

  • Plugin page: download-postpage...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.9
  • WordPress version: 6.3.1
  • First release: Oct 14, 2016
  • Latest release: Nov 9, 2017
  • Number of updates: 8
  • Update frequency: every 48.9 days
  • Top authors: bseddon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /947 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.64ms] Passed 4 tests

This is a short check of server-side resources used by Download-Post/Page Link
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1039.38 ▼2.60
Dashboard /wp-admin3.41 ▲0.1052.95 ▼0.27
Posts /wp-admin/edit.php3.52 ▲0.1655.52 ▲4.52
Add New Post /wp-admin/post-new.php5.99 ▲0.1191.22 ▼15.16
Media Library /wp-admin/upload.php3.33 ▲0.1040.91 ▲3.49

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Download-Post/Page Link
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.33 ▼1.052.07 ▲0.2044.40 ▲0.61
Dashboard /wp-admin2,206 ▲184.86 ▼1.0398.59 ▼7.9536.73 ▼10.69
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0139.84 ▼0.5536.71 ▼1.18
Add New Post /wp-admin/post-new.php6,253 ▲4,72026.18 ▲3.13957.34 ▲294.7653.14 ▼0.76
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.01103.76 ▼15.0446.08 ▼2.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: product, download, easy digital downloads, link, woocommerce

download-postpage-link/dpp-link.php 77% from 13 tests

The primary PHP file in "Download-Post/Page Link" version 1.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 189 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("download-postpage-link.php" instead of "dpp-link.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin327 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP199238327

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity50.00
▷ Minimum class complexity50.00
▷ Maximum class complexity50.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants20
▷ Global constants20100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/dpp-link-630x210.png11.70KB10.29KB▼ 12.09%