74% github-flavored-markdown-comments

Code Review | GitHub-Flavored Markdown Comments

WordPress plugin GitHub-Flavored Markdown Comments scored74%from 54 tests.

About plugin

  • Plugin page: github-flavored-m...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 8, 2013
  • Latest release: Mar 8, 2013
  • Number of updates: 3
  • Update frequency: every 3.3 days
  • Top authors: evansolomon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,924 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼43.21ms] Passed 4 tests

Analyzing server-side resources used by GitHub-Flavored Markdown Comments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.02 ▼0.4414.58 ▼36.13
Dashboard /wp-admin3.06 ▼0.2518.32 ▼33.04
Posts /wp-admin/edit.php3.06 ▼0.3014.20 ▼34.15
Add New Post /wp-admin/post-new.php3.06 ▼2.8315.89 ▼69.53
Media Library /wp-admin/upload.php3.06 ▼0.1722.43 ▼15.01

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for GitHub-Flavored Markdown Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.79 ▼0.634.47 ▲2.6942.73 ▼0.74
Dashboard /wp-admin2,209 ▲184.86 ▼0.01110.94 ▼5.2144.37 ▼3.06
Posts /wp-admin/edit.php2,092 ▼02.03 ▼0.0237.91 ▼0.7432.50 ▼2.52
Add New Post /wp-admin/post-new.php1,533 ▼123.33 ▼0.02668.73 ▼10.0453.38 ▲0.52
Media Library /wp-admin/upload.php1,385 ▼34.24 ▼0.1394.59 ▼12.8941.38 ▼4.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/github-flavored-markdown-comments/lib/markdown.php+780
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/github-flavored-markdown-comments/github-flavored-markdown-comments.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Markdown_Parser' not found in wp-content/plugins/github-flavored-markdown-comments/lib/markdown-extra.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Example of pre- and post- converted text (live previews are not (yet) includeded in the plugin).) image missing
You can take inspiration from this readme.txt

github-flavored-markdown-comments/github-flavored-markdown-comments.php Passed 13 tests

Analyzing the main PHP file in "GitHub-Flavored Markdown Comments" version 1.0
56 characters long description:
Markdown-powered WordPress comments, with a GitHub Twist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,785 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34217951,774
Markdown19011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity38.75
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods91
▷ Static methods11.10%
▷ Public methods9098.90%
▷ Protected methods00.00%
▷ Private methods11.10%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png36.37KB9.71KB▼ 73.31%