73% wp-mail-sending-widget-form

Code Review | WP mail-sending Widget

WordPress plugin WP mail-sending Widget scored73%from 54 tests.

About plugin

  • Plugin page: wp-mail-sending-w...
  • Plugin version: 2.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 12, 2016
  • Latest release: Aug 12, 2016
  • Number of updates: 11
  • Update frequency: N/A
  • Top authors: prashaddey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,012 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.91ms] Passed 4 tests

A check of server-side resources used by WP mail-sending Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.39 ▼8.85
Dashboard /wp-admin3.34 ▲0.0452.00 ▲2.46
Posts /wp-admin/edit.php3.39 ▲0.0447.68 ▼1.10
Add New Post /wp-admin/post-new.php5.94 ▲0.0685.74 ▼12.14
Media Library /wp-admin/upload.php3.27 ▲0.0438.97 ▲2.46

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: 1 new table, 7 new options
New tables
wp_a_wp_mail
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_id_of_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP mail-sending Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲10013.68 ▼0.691.96 ▼0.2141.67 ▲2.23
Dashboard /wp-admin2,222 ▲345.10 ▲0.20100.73 ▼9.1941.08 ▼3.61
Posts /wp-admin/edit.php2,108 ▲192.25 ▲0.2735.33 ▼5.8134.65 ▼2.61
Add New Post /wp-admin/post-new.php1,684 ▲16422.52 ▼0.94636.76 ▼40.1452.30 ▼5.85
Media Library /wp-admin/upload.php1,404 ▲194.32 ▲0.14112.92 ▼4.0948.73 ▼1.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_a_wp_mail
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_id_of_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-mail-sending-widget-form/wpmwp.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-mail-sending-widget-form/wpmwp.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-mail-sending-widget-form === )
You can look at the official readme.txt

wp-mail-sending-widget-form/init.php 92% from 13 tests

The main PHP script in "WP mail-sending Widget" version 2.01 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-mail-sending-widget-form.php" instead of "init.php")

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
Everything looks great! No dangerous files found in this plugin507 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
SVG100288
PHP48948167
CSS21550
JavaScript1052

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity7.00
▷ Minimum class complexity2.00
▷ Maximum class complexity12.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin