73% smart-wetransfer

Code Review | Smart WeTransfer

WordPress plugin Smart WeTransfer scored73%from 54 tests.

About plugin

  • Plugin page: smart-wetransfer
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4.2
  • WordPress version: 6.3.1
  • First release: Sep 2, 2019
  • Latest release: Jul 21, 2020
  • Number of updates: 10
  • Update frequency: every 32.4 days
  • Top authors: mrityunjay (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,814 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.58ms] Passed 4 tests

A check of server-side resources used by Smart WeTransfer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.06 ▲2.51
Dashboard /wp-admin3.37 ▲0.0645.49 ▼8.62
Posts /wp-admin/edit.php3.42 ▲0.0652.31 ▲7.46
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.06 ▼13.96
Media Library /wp-admin/upload.php3.29 ▲0.0633.25 ▼2.24
Settings /wp-admin/admin.php?page=wetransfer_settings3.2632.39
Smart WeTransfer /wp-admin/admin.php?page=wetransfer3.2631.20

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
wp_wetransfer
New WordPress options
theysaidso_admin_options
widget_recent-comments
jal_db_version
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Smart WeTransfer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲8113.94 ▼0.641.69 ▼0.5540.59 ▼7.37
Dashboard /wp-admin2,242 ▲545.21 ▼0.80103.45 ▼14.2837.74 ▼8.60
Posts /wp-admin/edit.php2,125 ▲362.33 ▲0.3039.65 ▲1.7435.22 ▲1.84
Add New Post /wp-admin/post-new.php1,545 ▲2617.88 ▼5.30695.98 ▲25.4063.38 ▼1.74
Media Library /wp-admin/upload.php1,418 ▲334.46 ▲0.2698.73 ▼7.8641.43 ▼3.35
Settings /wp-admin/admin.php?page=wetransfer_settings8301.9325.1025.08
Smart WeTransfer /wp-admin/admin.php?page=wetransfer8231.9725.2054.30

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
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wetransfer
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • jal_db_version
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-wetransfer/includes/styles.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-wetransfer/includes/scripts.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-wetransfer/includes/style.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Donate link: Invalid URI ("paypal.me/miishraa")
You can take inspiration from this readme.txt

smart-wetransfer/smart-wetransfer.php 85% from 13 tests

"Smart WeTransfer" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • 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 file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected335 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP45626276
CSS30635
JavaScript210624

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 files were detected