78% recent-posts-markdown

Code Review | Recent Posts Markdown Generator

WordPress plugin Recent Posts Markdown Generator scored78%from 54 tests.

About plugin

  • Plugin page: recent-posts-mark...
  • Plugin version: 0.0.7
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1.1
  • WordPress version: 6.3.1
  • First release: Mar 26, 2019
  • Latest release: Apr 15, 2019
  • Number of updates: 11
  • Update frequency: every 2.0 days
  • Top authors: harnerdesigns (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.33ms] Passed 4 tests

Server-side resources used by Recent Posts Markdown Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.55 ▲4.15
Dashboard /wp-admin3.33 ▼0.0247.46 ▼15.16
Posts /wp-admin/edit.php3.38 ▲0.0261.00 ▲14.94
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.29 ▼15.21
Media Library /wp-admin/upload.php3.25 ▲0.0237.24 ▲0.92
Recent Posts Markdown /wp-admin/tools.php?page=recentpostmd3.1929.82

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Recent Posts Markdown Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5814.48 ▼0.171.98 ▲0.1445.24 ▼0.12
Dashboard /wp-admin2,207 ▲185.84 ▲0.9697.43 ▼19.5436.44 ▼11.06
Posts /wp-admin/edit.php2,090 ▲12.01 ▼0.0034.09 ▲0.7134.79 ▼0.70
Add New Post /wp-admin/post-new.php1,532 ▼122.77 ▼0.36654.74 ▼20.0254.48 ▲7.54
Media Library /wp-admin/upload.php1,392 ▲104.27 ▲0.0995.32 ▼6.4439.71 ▼2.69
Recent Posts Markdown /wp-admin/tools.php?page=recentpostmd8052.0423.6333.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/tools.php?page=recentpostmd
    • > Notice in wp-content/plugins/recent-posts-markdown/recent-posts-md.php+47
    Undefined index: recentpostmd
    • > GET request to /wp-admin/tools.php?page=recentpostmd
    • > Notice in wp-content/plugins/recent-posts-markdown/recent-posts-md.php+93
    Undefined index: postType
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=recentpostmd
    • > Notice in wp-content/plugins/recent-posts-markdown/recent-posts-md.php+97
    Undefined variable: submittedType
    • > GET request to /wp-admin/tools.php?page=recentpostmd
    • > Notice in wp-content/plugins/recent-posts-markdown/recent-posts-md.php+105
    Undefined variable: submittedCount
    • > GET request to /wp-admin/tools.php?page=recentpostmd
    • > Notice in wp-content/plugins/recent-posts-markdown/recent-posts-md.php+109
    Undefined variable: markdownContent

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recent-posts-markdown/recent-posts-md.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: markdown, link list, recent posts, seo

recent-posts-markdown/recent-posts-md.php 92% from 13 tests

The main PHP file in "Recent Posts Markdown Generator" ver. 0.0.7 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("recent-posts-markdown.php" instead of "recent-posts-md.php")

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
There were no executable files found in this plugin7,066 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JSON2006,767
CSS111104
JavaScript2543389
PHP1381186
Markdown110020

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin