84% wp-mailto-links

Code Review | WP Mailto Links - Protect Email Addresses

WordPress plugin WP Mailto Links - Protect Email Addresses scored84%from 54 tests.

About plugin

  • Plugin page: wp-mailto-links
  • Plugin version: 3.1.4
  • PHP compatiblity: 5.3.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Mar 17, 2011
  • Latest release: Sep 22, 2023
  • Number of updates: 85
  • Update frequency: every 53.8 days
  • Top authors: freelancephp (67.06%)ironikus (22.35%)WebFactory (12.94%)

Code review

54 tests

User reviews

33 reviews

Install metrics

10,000+ active /176,383 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.34MB] [CPU: ▼1.05ms] Passed 4 tests

This is a short check of server-side resources used by WP Mailto Links - Protect Email Addresses
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4745.00 ▼0.10
Dashboard /wp-admin3.67 ▲0.3751.16 ▼3.51
Posts /wp-admin/edit.php3.72 ▲0.3751.30 ▼1.68
Add New Post /wp-admin/post-new.php6.19 ▲0.3096.27 ▲2.26
Media Library /wp-admin/upload.php3.53 ▲0.3038.28 ▲1.11
WP Mailto Links /wp-admin/options-general.php?page=wp-mailto-links-option-page3.5437.77

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
wp-mailto-links-version
wp-mailto-links

Browser metrics Passed 4 tests

An overview of browser requirements for WP Mailto Links - Protect Email Addresses
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.40 ▼1.199.71 ▲7.9744.10 ▼1.39
Dashboard /wp-admin2,193 ▲165.59 ▲0.0291.68 ▼0.4144.74 ▼0.31
Posts /wp-admin/edit.php2,107 ▼02.03 ▲0.0239.68 ▼2.1835.96 ▼0.07
Add New Post /wp-admin/post-new.php1,529 ▼623.25 ▲4.96647.49 ▲20.9749.22 ▼18.90
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.05109.39 ▲0.1449.10 ▲4.45
WP Mailto Links /wp-admin/options-general.php?page=wp-mailto-links-option-page1,6501.8227.8431.43

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • wp-mailto-links-version
    • wp-mailto-links
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPMT() in wp-content/plugins/wp-mailto-links/core/includes/partials/help-tabs/template-tags.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-mailto-links/core/includes/partials/widgets/sidebar.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/wp-mailto-links/core/includes/partials/help-tabs/general.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPMT() in wp-content/plugins/wp-mailto-links/core/includes/partials/widgets/main.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_screen() in wp-content/plugins/wp-mailto-links/core/includes/partials/wpmt-page-display.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPMT() in wp-content/plugins/wp-mailto-links/core/includes/partials/help-tabs/shortcodes.php:1

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 on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-mailto-links/wp-mailto-links.php Passed 13 tests

This is the main PHP file of "WP Mailto Links - Protect Email Addresses" version 3.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
120 characters long description:
Protect & encode email addresses and mailto links from spambots & spamming. Easy to use - encodes emails out-of-the-box.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,898 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP185419111,792
JavaScript2251665
CSS22027
PO File10014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity26.56
▷ Minimum class complexity4.00
▷ Maximum class complexity93.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods99
▷ Static methods11.01%
▷ Public methods9292.93%
▷ Protected methods00.00%
▷ Private methods77.07%
Functions8
▷ Named functions337.50%
▷ Anonymous functions562.50%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/includes/assets/img/icon-email-encoder-bundle.png1.32KB1.45KB0.00%
core/includes/assets/img/icon-wp-webhooks.png11.71KB4.92KB▼ 58.02%
core/includes/assets/img/icon-wp-snow.png1.60KB1.60KB0.00%