84% markdown-shortcode

Code Review | Markdown Shortcode

WordPress plugin Markdown Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: markdown-shortcode
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 10, 2015
  • Latest release: Oct 10, 2015
  • Number of updates: 13
  • Update frequency: every 2.5 days
  • Top authors: JHoppe (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /1,775 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.59ms] Passed 4 tests

A check of server-side resources used by Markdown Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.39 ▼1.94
Dashboard /wp-admin3.31 ▼0.0346.30 ▼16.88
Posts /wp-admin/edit.php3.36 ▲0.0144.98 ▲3.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.41 ▼29.78
Media Library /wp-admin/upload.php3.23 ▲0.0034.25 ▲2.23

Server storage [IO: ▲0.23MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Markdown Shortcode: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.42 ▲0.074.92 ▲3.2242.87 ▲0.42
Dashboard /wp-admin2,198 ▲215.59 ▲0.0684.07 ▼12.1339.10 ▼5.42
Posts /wp-admin/edit.php2,097 ▼31.99 ▼0.0336.13 ▼2.3330.12 ▼6.90
Add New Post /wp-admin/post-new.php1,528 ▼023.30 ▲0.12669.26 ▲78.2156.76 ▼6.10
Media Library /wp-admin/upload.php1,403 ▼04.22 ▲0.0899.25 ▲4.2143.79 ▲2.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/markdown-shortcode/markdown-shortcode.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'markdown_shortcode\\Parsedown' not found in wp-content/plugins/markdown-shortcode/parsedown/ParsedownExtra.php:18

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 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Blog post written in markdown.), #2 (Same blog post on front end.)
  • Requires at least: Version format is invalid
The official readme.txt is a good inspiration

markdown-shortcode/markdown-shortcode.php Passed 13 tests

The main PHP file in "Markdown Shortcode" ver. 0.2.1 adds more information about the plugin and also serves as the entry point for this plugin
114 characters long description:
damn simple [markdown]#via shortcode[/markdown], uses parsedown (parsedown.org) and highlight.js (highlightjs.org)

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
Success! There were no dangerous files found in this plugin2,927 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP34871711,488
Markdown43890995
CSS34510441
JavaScript2003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity66.67
▷ Minimum class complexity3.00
▷ Maximum class complexity159.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods71
▷ Static methods22.82%
▷ Public methods1723.94%
▷ Protected methods5374.65%
▷ Private methods11.41%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 compressed PNG files occupy 0.08MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon-256x256.png2.29KB2.39KB0.00%
screenshot-2.png50.47KB53.34KB0.00%
screenshot-1.png27.07KB28.81KB0.00%