84% sendthisfile-button

Code Review | SendThisFile Button

WordPress plugin SendThisFile Button scored84%from 54 tests.

About plugin

  • Plugin page: sendthisfile-button
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 10, 2023
  • Latest release: Mar 21, 2023
  • Number of updates: 17
  • Update frequency: every 0.8 days
  • Top authors: sendthisfile (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /686 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.36ms] Passed 4 tests

Server-side resources used by SendThisFile Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.01 ▼3.61
Dashboard /wp-admin3.33 ▲0.0247.63 ▼2.20
Posts /wp-admin/edit.php3.38 ▲0.0249.59 ▼5.36
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.48 ▼2.28
Media Library /wp-admin/upload.php3.25 ▲0.0237.81 ▲4.21

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by SendThisFile Button
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5813.14 ▼1.611.62 ▼0.3141.06 ▼7.93
Dashboard /wp-admin2,224 ▲334.89 ▼0.06108.13 ▼12.3675.06 ▲32.41
Posts /wp-admin/edit.php2,107 ▲182.04 ▼0.0138.04 ▼8.9835.75 ▼2.62
Add New Post /wp-admin/post-new.php1,536 ▲1923.22 ▲5.74753.16 ▲141.9265.13 ▲14.63
Media Library /wp-admin/upload.php1,397 ▲94.18 ▲0.00109.07 ▲13.2771.15 ▲31.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      implode(): Invalid arguments passed in wp-content/plugins/sendthisfile-button/widget.php on line 1
    • > PHP Notice
      Undefined variable: entries in wp-content/plugins/sendthisfile-button/widget.php on line 1

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: sendthisfile

sendthisfile-button/sendthisfile-button.php 92% from 13 tests

The main PHP file in "SendThisFile Button" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin148 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31913106
SVG10142

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods872.73%
▷ Protected methods00.00%
▷ Private methods327.27%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
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
images/icon.png0.38KB0.31KB▼ 19.34%