84% webmention

Code Review | Webmention

WordPress plugin Webmention scored84%from 54 tests.

About plugin

  • Plugin page: webmention
  • Plugin version: 5.1.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Jan 10, 2014
  • Latest release: Nov 18, 2023
  • Number of updates: 104
  • Update frequency: every 35.3 days
  • Top authors: pfefferle (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

900+ active /38,042 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.71MB] [CPU: ▲1.86ms] Passed 4 tests

Analyzing server-side resources used by Webmention
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.6944.51 ▲1.89
Dashboard /wp-admin4.02 ▲0.7250.63 ▲3.83
Posts /wp-admin/edit.php4.07 ▲0.7153.24 ▲8.11
Add New Post /wp-admin/post-new.php6.65 ▲0.7688.83 ▼2.20
Media Library /wp-admin/upload.php3.94 ▲0.7137.79 ▲3.92
Webmention /wp-admin/tools.php?page=webmention-tools3.8634.49
Webmention /wp-admin/options-general.php?page=webmention3.9739.43

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 44 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
webmention_db_version
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Webmention: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6114.34 ▲0.082.06 ▲0.2743.08 ▼1.16
Dashboard /wp-admin2,206 ▲325.60 ▼0.0197.09 ▲5.5542.23 ▼0.86
Posts /wp-admin/edit.php2,111 ▲112.01 ▼0.0041.07 ▲0.6334.82 ▲1.95
Add New Post /wp-admin/post-new.php1,532 ▲123.32 ▲0.45588.74 ▼80.8358.54 ▲9.17
Media Library /wp-admin/upload.php1,411 ▲144.16 ▼0.12103.32 ▼8.1146.94 ▲2.21
Webmention /wp-admin/tools.php?page=webmention-tools8182.0125.9628.47
Webmention /wp-admin/options-general.php?page=webmention1,6345.6559.2335.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • webmention_db_version
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Webmention\\Handler\\Base' not found in wp-content/plugins/webmention/includes/Handler/class-meta.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Webmention\\add_filter() in wp-content/plugins/webmention/includes/debug.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/webmention/templates/webmention-tools.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/webmention/templates/webmention-comment-form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_comments() in wp-content/plugins/webmention/templates/webmention-comments.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Webmention\\Handler\\Base' not found in wp-content/plugins/webmention/includes/Handler/class-jsonld.php:13
    • > PHP Warning
      Use of undefined constant WEEK_IN_SECONDS - assumed 'WEEK_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/webmention/webmention.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/webmention/templates/webmention-comment.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/webmention/includes/class-cli.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/webmention/templates/webmention-edit-comment-form.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)
There were no browser issues found

Optimizations

Plugin configuration Passed 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
7 plugin tags: linkback, webmention, pingback, response, comment...

webmention/webmention.php Passed 13 tests

"Webmention" version 5.1.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
38 characters long description:
Webmention support for WordPress posts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin8,937 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP359532,9175,353
JSON2003,520
CSS18040
Markdown213024

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.48
Average class complexity35.17
▷ Minimum class complexity3.00
▷ Maximum class complexity291.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes14.55%
Methods216
▷ Static methods8941.20%
▷ Public methods17882.41%
▷ Protected methods3214.81%
▷ Private methods62.78%
Functions69
▷ Named functions6797.10%
▷ Anonymous functions22.90%
Constants14
▷ Global constants14100.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
There were not PNG files found in your plugin