84% markdownr

Code Review | markdownR

WordPress plugin markdownR scored 84% from 54 tests.

About plugin

  • Plugin page: markdownr
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7
  • WordPress version: 6.3.1
  • First release: May 1, 2015
  • Latest release: Jan 23, 2017
  • Number of updates: 3
  • Update frequency: every 211.7 days
  • Top authors: jianhong.ou (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 631 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.16ms] Passed 4 tests

Analyzing server-side resources used by markdownR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0546.93 ▲7.58
Dashboard /wp-admin3.35 ▲0.0447.27 ▲1.07
Posts /wp-admin/edit.php3.40 ▲0.0443.19 ▼0.37
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.53 ▼14.35
Media Library /wp-admin/upload.php3.27 ▲0.0434.76 ▲1.00
markdown R /wp-admin/options-general.php?page=markdownR3.2329.54

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
ou_markdownR_options_rstudio_pandoc_path
ou_markdownR_options_magic_quotes
ou_markdownR_options_R_path

Browser metrics Passed 4 tests

A check of browser resources used by markdownR
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.54 ▼0.762.72 ▲0.8743.77 ▲2.06
Dashboard /wp-admin2,210 ▲185.86 ▲0.9296.41 ▼16.2136.85 ▼3.32
Posts /wp-admin/edit.php2,093 ▲72.01 ▲0.0436.51 ▼0.1934.28 ▲2.54
Add New Post /wp-admin/post-new.php11,358 ▲9,83927.03 ▲3.891,090.48 ▲421.9755.15 ▼1.23
Media Library /wp-admin/upload.php1,392 ▲44.16 ▲0.0094.87 ▼5.1339.29 ▼5.59
markdown R /wp-admin/options-general.php?page=markdownR8082.0624.5528.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/markdownr/markdownR.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (markdownR Option and R log file page), #2 (editor page), #3 (post page)
You can take inspiration from this readme.txt

markdownr/markdownR.php 92% from 13 tests

The primary PHP file in "markdownR" version 1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("markdownr.php" instead of "markdownR.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
Good job! No executable or dangerous file extensions detected206 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12653158
CSS16024
R12014
JavaScript10110

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png30.76KB8.79KB▼ 71.42%
screenshot-1.png29.68KB8.51KB▼ 71.32%
screenshot-3.png34.54KB9.83KB▼ 71.55%