84% tkt-send-email-if

Code Review | TukuToi Send Email If

WordPress plugin TukuToi Send Email If scored 84% from 54 tests.

About plugin

  • Plugin page: tkt-send-email-if
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 6.3.1
  • First release: Jun 30, 2021
  • Latest release: Jun 30, 2021
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: bedas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 475 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.72ms] Passed 4 tests

An overview of server-side resources used by TukuToi Send Email If
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.35 ▼14.58
Dashboard /wp-admin3.36 ▲0.0647.55 ▼1.96
Posts /wp-admin/edit.php3.47 ▲0.1247.37 ▲0.89
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.90 ▼11.24
Media Library /wp-admin/upload.php3.28 ▲0.0536.90 ▲1.03

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for TukuToi Send Email If
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.72 ▼0.951.77 ▼0.2043.18 ▲5.97
Dashboard /wp-admin2,205 ▲144.82 ▼0.06115.54 ▲14.2343.44 ▲1.41
Posts /wp-admin/edit.php2,091 ▼12.02 ▼0.0133.92 ▼3.3234.24 ▲3.95
Add New Post /wp-admin/post-new.php1,516 ▼1217.69 ▼5.39665.59 ▲37.2457.89 ▲4.96
Media Library /wp-admin/upload.php1,393 ▲24.25 ▲0.1297.71 ▲2.9140.72 ▼1.14

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/tkt-send-email-if/admin/partials/tkt-send-email-if-admin-display.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: email, view, talent, visitor notification, classicpress

tkt-send-email-if/tkt-send-email-if.php Passed 13 tests

The main PHP file in "TukuToi Send Email If" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
133 characters long description:
Send Email If Plugin allows you to send an email to a dynamically set receiver, whenever a Post is visited by users of defined roles.

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
Everything looks great! No dangerous files found in this plugin225 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP8122456216
CSS1049

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.60
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods1872.00%
▷ Protected methods00.00%
▷ Private methods728.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin