84% wp-parsedown

Code Review | WP-Parsedown

WordPress plugin WP-Parsedown scored84%from 54 tests.

About plugin

  • Plugin page: wp-parsedown
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2014
  • Latest release: Jan 19, 2016
  • Number of updates: 7
  • Update frequency: every 77.7 days
  • Top authors: cadeyrn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,153 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼6.87ms] Passed 4 tests

An overview of server-side resources used by WP-Parsedown
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1940.62 ▲0.34
Dashboard /wp-admin3.50 ▲0.2050.18 ▼3.75
Posts /wp-admin/edit.php3.61 ▲0.2650.03 ▼2.66
Add New Post /wp-admin/post-new.php6.08 ▲0.1984.42 ▼18.86
Media Library /wp-admin/upload.php3.42 ▲0.1937.94 ▼2.21

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 134 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP-Parsedown
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,786 ▲2514.25 ▼0.392.20 ▲0.4642.58 ▲3.64
Dashboard /wp-admin2,195 ▲215.68 ▲0.0188.71 ▼2.2840.49 ▲1.66
Posts /wp-admin/edit.php2,100 ▼72.03 ▲0.0336.44 ▼6.1734.39 ▼0.66
Add New Post /wp-admin/post-new.php1,526 ▼023.17 ▼0.04655.58 ▲4.6754.67 ▼4.39
Media Library /wp-admin/upload.php1,403 ▲64.18 ▲0.02105.52 ▲4.7046.42 ▲2.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      include(ParsedownExtra.php): failed to open stream: No such file or directory in wp-content/plugins/wp-parsedown/lib/parsedown-extra/test/bootstrap.php on line 10
    • > PHP Warning
      include(Parsedown.php): failed to open stream: No such file or directory in wp-content/plugins/wp-parsedown/lib/parsedown/test/bootstrap.php on line 3
    • > PHP Warning
      include(): Failed opening 'vendor/erusev/parsedown/Parsedown.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-parsedown/lib/parsedown-extra/test/bootstrap.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'ParsedownTest' not found in wp-content/plugins/wp-parsedown/lib/parsedown-extra/test/ParsedownExtraTest.php:3
    • > PHP Warning
      include(): Failed opening 'vendor/erusev/parsedown/test/ParsedownTest.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-parsedown/lib/parsedown-extra/test/bootstrap.php on line 8
    • > PHP Warning
      include(vendor/erusev/parsedown/Parsedown.php): failed to open stream: No such file or directory in wp-content/plugins/wp-parsedown/lib/parsedown-extra/test/bootstrap.php on line 7
    • > PHP Warning
      include(): Failed opening 'Parsedown.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-parsedown/lib/parsedown/test/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-parsedown/lib/parsedown/test/CommonMarkTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Parsedown' not found in wp-content/plugins/wp-parsedown/lib/parsedown-extra/ParsedownExtra.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-parsedown/lib/parsedown/test/ParsedownTest.php:3

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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Invalid url: ""
The official readme.txt might help

wp-parsedown/wp-parsedown.php Passed 13 tests

"WP-Parsedown" version 0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
60 characters long description:
[Parsedown Extra](www.parsedown.org/demo?extra=1) on-the-fly

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 plugin2,565 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
PHP85332001,637
HTML5643475
Markdown602000398
JSON20039
XML20016

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity35.00
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods78
▷ Static methods11.28%
▷ Public methods1924.36%
▷ Protected methods5773.08%
▷ Private methods22.56%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin