74% md-webhook

Code Review | Markdown Webhook

WordPress plugin Markdown Webhook scored 74% from 54 tests.

About plugin

  • Plugin page: md-webhook
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Sep 30, 2017
  • Latest release: Sep 30, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: chenzhaolonglong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 695 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
Install script ran successfully

Server metrics [RAM: ▼0.91MB] [CPU: ▼30.61ms] Passed 4 tests

Analyzing server-side resources used by Markdown Webhook
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0629.46 ▼6.50
Dashboard /wp-admin3.03 ▼0.2722.87 ▼26.55
Posts /wp-admin/edit.php3.04 ▼0.3227.36 ▼19.87
Add New Post /wp-admin/post-new.php3.03 ▼2.8525.26 ▼65.53
Media Library /wp-admin/upload.php3.04 ▼0.1922.50 ▼10.47
Markdown Webhook /wp-admin/edit.php?page=mdwh3.0426.94

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
mdwh_token
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
mdwh_active

Browser metrics Passed 4 tests

Markdown Webhook: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.65 ▼0.9411.21 ▲9.1338.54 ▼12.87
Dashboard /wp-admin2,213 ▲284.85 ▼1.01110.49 ▲10.0137.42 ▼3.83
Posts /wp-admin/edit.php2,096 ▲42.05 ▲0.0539.63 ▲3.5534.84 ▲2.37
Add New Post /wp-admin/post-new.php1,523 ▼1323.14 ▼0.19640.62 ▲4.9457.29 ▼2.44
Media Library /wp-admin/upload.php1,392 ▲74.19 ▲0.0296.94 ▼5.4340.68 ▼1.92
Markdown Webhook /wp-admin/edit.php?page=mdwh9071.7228.6131.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/md-webhook/index.php+137
    Use of undefined constant type - assumed 'type' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 7 options
    • mdwh_token
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?page=mdwh
    • > Warning in wp-content/plugins/md-webhook/index.php+142
    Use of undefined constant type - assumed 'type' (this will throw an Error in a future version of PHP)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?page=mdwh
    • > Warning in wp-content/plugins/md-webhook/index.php+142
    Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?page=mdwh
    • > Warning in wp-content/plugins/md-webhook/index.php+142
    Use of undefined constant tip - assumed 'tip' (this will throw an Error in a future version of PHP)

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: md, github, webhook, bitbucket, post...

md-webhook/index.php 92% from 13 tests

This is the main PHP file of "Markdown Webhook" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("md-webhook.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected438 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP23011398
JavaScript33139
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity21.50
▷ Minimum class complexity15.00
▷ Maximum class complexity28.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods1982.61%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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