84% sendwp

Code Review | SendWP

WordPress plugin SendWP scored84%from 54 tests.

About plugin

  • Plugin page: sendwp
  • Plugin version: 1.4.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2
  • WordPress version: 6.3.1
  • First release: Mar 13, 2019
  • Latest release: Apr 24, 2023
  • Number of updates: 37
  • Update frequency: every 41.0 days
  • Top authors: mrpritchett (54.05%)kbjohnson90 (35.14%)krmoorhouse (16.22%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10,000+ active /262,666 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.27ms] Passed 4 tests

Analyzing server-side resources used by SendWP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.31 ▼2.55
Dashboard /wp-admin3.37 ▲0.0749.46 ▲0.93
Posts /wp-admin/edit.php3.48 ▲0.1351.74 ▲6.37
Add New Post /wp-admin/post-new.php5.97 ▲0.0897.02 ▼0.32
Media Library /wp-admin/upload.php3.29 ▲0.0638.09 ▲0.87
SendWP /wp-admin/tools.php?page=sendwp3.3134.52

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SendWP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.24 ▼1.345.03 ▲3.3230.69 ▼10.26
Dashboard /wp-admin2,239 ▲324.89 ▼1.16103.07 ▼7.1646.01 ▼0.23
Posts /wp-admin/edit.php2,118 ▲181.98 ▼0.0041.44 ▲5.3538.80 ▲2.95
Add New Post /wp-admin/post-new.php1,561 ▲1521.02 ▼2.06644.23 ▼13.5058.84 ▲5.19
Media Library /wp-admin/upload.php1,421 ▲184.30 ▲0.05101.49 ▼2.4745.33 ▲1.16
SendWP /wp-admin/tools.php?page=sendwp8952.0424.2429.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 fix the following items
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sendwp/includes/trustedlogin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sendwp/includes/admin/load.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sendwp_client_connected() in wp-content/plugins/sendwp/includes/admin/views/menu.html.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sendwp/sendwp.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/sendwp/assets/load.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'SendWP\\MailerInterface' not found in wp-content/plugins/sendwp/includes/class.mailer.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sendwp_forwarding_enabled() in wp-content/plugins/sendwp/includes/hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/sendwp/includes/deactivation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sendwp/includes/admin/views/disabled-notice.html.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sendwp/includes/functions.php:243

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 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
3 plugin tags: forms, transactional, email

sendwp/sendwp.php 92% from 13 tests

"SendWP" version 1.4.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.6.0" instead of "5.6")

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
No dangerous file extensions were detected5,674 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP451,5412,4074,667
Sass41003533
JavaScript25322179
JSON100145
CSS304124
SVG30014
Markdown16012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity23.54
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes1252.17%
Methods228
▷ Static methods2912.72%
▷ Public methods17777.63%
▷ Protected methods73.07%
▷ Private methods4419.30%
Functions37
▷ Named functions2875.68%
▷ Anonymous functions924.32%
Constants27
▷ Global constants00.00%
▷ Class constants27100.00%
▷ Public constants27100.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 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo-render.png20.64KB4.98KB▼ 75.86%