84% sendwithus

Code Review | sendwithus

WordPress plugin sendwithus scored84%from 54 tests.

About plugin

  • Plugin page: sendwithus
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 5, 2014
  • Latest release: Jul 23, 2015
  • Number of updates: 19
  • Update frequency: every 22.1 days
  • Top authors: dylanemoore (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,295 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.28MB] [CPU: ▲1.31ms] Passed 4 tests

An overview of server-side resources used by sendwithus
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2838.81 ▼1.34
Dashboard /wp-admin3.59 ▲0.2860.92 ▲13.15
Posts /wp-admin/edit.php3.70 ▲0.3450.18 ▲4.00
Add New Post /wp-admin/post-new.php6.17 ▲0.2888.14 ▼4.18
Media Library /wp-admin/upload.php3.51 ▲0.2840.33 ▲6.75

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for sendwithus
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲13313.32 ▼1.261.77 ▼0.0943.33 ▼1.59
Dashboard /wp-admin2,268 ▲964.95 ▼0.91106.93 ▼2.2941.27 ▼3.58
Posts /wp-admin/edit.php2,157 ▲682.32 ▲0.2741.95 ▲4.3534.46 ▲2.03
Add New Post /wp-admin/post-new.php1,548 ▲3423.36 ▲5.77679.55 ▼16.8959.59 ▼2.51
Media Library /wp-admin/upload.php1,454 ▲664.37 ▲0.15109.49 ▼7.8648.24 ▼1.00

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/sendwithus/sendwithus_php/test/APITest.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sendwithus/inc/multisite_overrides.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sendwithus/inc/helper_functions.php:211
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sendwithus/inc/single_site_overrides.php:269
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sendwithus/inc/helper_functions.php:211

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

sendwithus/sendwithus.php Passed 13 tests

The primary PHP file in "sendwithus" version 1.1.0 is used by WordPress to initiate all plugin functionality
68 characters long description:
Easily integrate transactional email into WordPress' default emails.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,573 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP94324911,899
Markdown21310523
CSS1310133
XML12011
JSON1007

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity11.67
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods79
▷ Static methods00.00%
▷ Public methods7493.67%
▷ Protected methods00.00%
▷ Private methods56.33%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) sendwithus_php/test/test_img.png0.02KB0.00KB▼ 100.00%