83% sendsmith

Code Review | SendSmith

WordPress plugin SendSmith scored83%from 54 tests.

About plugin

  • Plugin page: sendsmith
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.3.1
  • WordPress version: 6.3.1
  • First release: Apr 22, 2016
  • Latest release: Apr 27, 2016
  • Number of updates: 15
  • Update frequency: every 0.3 days
  • Top authors: sendsmith (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /571 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.11MB] [CPU: ▼1.65ms] Passed 4 tests

This is a short check of server-side resources used by SendSmith
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.94 ▼2.64
Dashboard /wp-admin3.42 ▲0.1255.51 ▲1.57
Posts /wp-admin/edit.php3.54 ▲0.1851.23 ▼0.18
Add New Post /wp-admin/post-new.php6.03 ▲0.1489.34 ▼5.35
Media Library /wp-admin/upload.php3.35 ▲0.1239.40 ▲2.60
Settings /wp-admin/admin.php?page=sendsmith_settings3.3233.90
SendSmith /wp-admin/admin.php?page=sendsmith3.3133.36

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
sendsmith-doubleopt-form
widget_recent-posts
db_upgraded
sendsmith-doubleopt-roles
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for SendSmith
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19814.19 ▼0.398.74 ▲6.4242.05 ▼4.50
Dashboard /wp-admin2,225 ▲405.09 ▲0.25115.47 ▼1.1984.41 ▲34.14
Posts /wp-admin/edit.php2,126 ▲372.29 ▲0.3034.87 ▼2.8733.42 ▲0.28
Add New Post /wp-admin/post-new.php1,544 ▲217.63 ▼0.65666.11 ▲36.0337.86 ▼16.08
Media Library /wp-admin/upload.php1,419 ▲314.51 ▲0.23110.73 ▲5.0473.83 ▲25.90
Settings /wp-admin/admin.php?page=sendsmith_settings8671.8025.2927.86
SendSmith /wp-admin/admin.php?page=sendsmith8621.9024.9026.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • sendsmith-doubleopt-form
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • sendsmith-doubleopt-roles

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)
Good news, no errors were detected

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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sendsmith/tpl/admin/main.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sendsmith/tpl/admin/forms.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sendsmith/tpl/admin/roles.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sendsmith/tpl/admin/tags.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sendsmith/tpl/admin/settings.tpl.php:2

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
3 plugin tags: email plugin, email marketing, newsletter

sendsmith/index.php 77% from 13 tests

The main PHP file in "SendSmith" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 203 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sendsmith.php" instead of "index.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin1,098 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP9131161907
CSS3101115
JavaScript314676

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity85.00
▷ Minimum class complexity84.00
▷ Maximum class complexity86.00
Average method complexity6.42
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2993.55%
▷ Protected methods26.45%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo_icon.png9.27KB4.37KB▼ 52.82%
assets/images/icon.png4.42KB1.19KB▼ 73.17%