10% dlbs-send-a-link

Code Review | dlb's Send-A-Link

WordPress plugin dlb's Send-A-Link scored10%from 54 tests.

About plugin

  • Plugin page: dlbs-send-a-link
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Jun 14, 2013
  • Latest release: Oct 14, 2019
  • Number of updates: 28
  • Update frequency: every 82.7 days
  • Top authors: DrandLomB (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,712 total downloads

Benchmarks

Plugin footprint 58% 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
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead.

Server metrics [RAM: ▼0.07MB] [CPU: ▼9.38ms] Passed 4 tests

An overview of server-side resources used by dlb's Send-A-Link
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.93 ▼0.5317.97 ▼23.15
Dashboard /wp-admin3.40 ▲0.0643.59 ▼19.33
Posts /wp-admin/edit.php3.51 ▲0.1649.52 ▲4.26
Add New Post /wp-admin/post-new.php5.98 ▲0.1092.65 ▲2.49
Media Library /wp-admin/upload.php3.32 ▲0.1037.89 ▲2.46

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: 1 new table, 7 new options
New tables
wp_dslLog
New WordPress options
widget_recent-comments
dsl_db_version
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

dlb's Send-A-Link: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.171.84 ▼0.3540.81 ▼2.46
Dashboard /wp-admin2,209 ▲214.87 ▲0.00102.60 ▼13.6641.50 ▼4.70
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0238.88 ▲0.9134.95 ▼3.39
Add New Post /wp-admin/post-new.php1,514 ▼1917.69 ▼5.59702.65 ▲74.2562.09 ▲8.66
Media Library /wp-admin/upload.php1,391 ▲34.22 ▲0.0296.12 ▼1.3641.58 ▼1.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dlbs-send-a-link/dsl.php:86

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

dlbs-send-a-link/dsl.php 92% from 13 tests

"dlb's Send-A-Link" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dlbs-send-a-link.php" instead of "dsl.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 plugin917 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP345633657
JavaScript1011597
HTML209390
CSS112073

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants34
▷ Global constants34100.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
No PNG images were found in this plugin