10% send-email-attachment-to-dropbox

Code Review | Send email attachment to dropbox

WordPress plugin Send email attachment to dropbox scored10%from 54 tests.

About plugin

  • Plugin page: send-email-attach...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.1
  • WordPress version: 6.3.1
  • First release: Aug 4, 2015
  • Latest release: Aug 4, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: asaquzzaman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /797 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/send-email-attachment-to-dropbox/classes/settings.php+482
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.48MB] [CPU: ▼54.97ms] Passed 4 tests

A check of server-side resources used by Send email attachment to dropbox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.52 ▼0.955.99 ▼31.75
Dashboard /wp-admin2.54 ▼0.817.04 ▼55.00
Posts /wp-admin/edit.php2.54 ▼0.827.90 ▼41.37
Add New Post /wp-admin/post-new.php2.54 ▼3.358.90 ▼91.75
Media Library /wp-admin/upload.php2.54 ▼0.697.87 ▼29.54

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 61 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Send email attachment to dropbox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.32 ▼1.061.78 ▲0.1242.34 ▼0.13
Dashboard /wp-admin2,225 ▲344.84 ▼0.06111.37 ▲11.8841.58 ▲0.02
Posts /wp-admin/edit.php2,105 ▲162.04 ▼0.0140.96 ▲2.3934.48 ▲0.58
Add New Post /wp-admin/post-new.php1,555 ▲3618.24 ▼2.64596.70 ▼130.5253.20 ▼1.90
Media Library /wp-admin/upload.php1,407 ▲224.19 ▼0.0397.98 ▼5.2941.36 ▼5.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/send-email-attachment-to-dropbox/classes/settings.php+482
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Dropbox\\Exception' not found in wp-content/plugins/send-email-attachment-to-dropbox/lib/Dropbox/Exception/ProtocolError.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Dropbox\\WebAuthBase' not found in wp-content/plugins/send-email-attachment-to-dropbox/lib/Dropbox/WebAuth.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/send-email-attachment-to-dropbox/templates/attachment/lists.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Dropbox\\Exception_ProtocolError' not found in wp-content/plugins/send-email-attachment-to-dropbox/lib/Dropbox/Exception/BadResponse.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/send-email-attachment-to-dropbox/templates/attachment/settings.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Dropbox\\Exception_BadResponse' not found in wp-content/plugins/send-email-attachment-to-dropbox/lib/Dropbox/Exception/BadResponseCode.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Dropbox\\WebAuthBase' not found in wp-content/plugins/send-email-attachment-to-dropbox/lib/Dropbox/WebAuthNoRedirect.php:39
    • > PHP Fatal error
      Uncaught Error: Interface 'Dropbox\\ValueStore' not found in wp-content/plugins/send-email-attachment-to-dropbox/lib/Dropbox/ArrayEntryStore.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mdrop_page() in wp-content/plugins/send-email-attachment-to-dropbox/templates/attachment/header.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Dropbox\\Exception_ProtocolError' not found in wp-content/plugins/send-email-attachment-to-dropbox/lib/Dropbox/Exception/BadRequest.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: email wordpress post, email to wordpress, email to wp, email wp post, email to dropbox

send-email-attachment-to-dropbox/mdrop.php 92% from 13 tests

The main PHP script in "Send email attachment to dropbox" version 0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("send-email-attachment-to-dropbox.php" instead of "mdrop.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/send-email-attachment-to-dropbox/lib/Dropbox/certs/trusted-certs.crt
4,343 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP559442,0694,042
JavaScript1350220
CSS111081

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity15.17
▷ Minimum class complexity1.00
▷ Maximum class complexity342.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes46
▷ Abstract classes00.00%
▷ Concrete classes46100.00%
▷ Final classes1839.13%
Methods266
▷ Static methods8331.20%
▷ Public methods24391.35%
▷ Protected methods31.13%
▷ Private methods207.52%
Functions26
▷ Named functions1973.08%
▷ Anonymous functions726.92%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin