84% mf2-feed

Code Review | MF2 Feeds

WordPress plugin MF2 Feeds scored84%from 54 tests.

About plugin

  • Plugin page: mf2-feed
  • Plugin version: 3.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Aug 14, 2018
  • Latest release: Sep 1, 2023
  • Number of updates: 10
  • Update frequency: every 184.4 days
  • Top authors: indieweb (70%)pfefferle (40%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,091 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.03MB] [CPU: ▼10.64ms] Passed 4 tests

An overview of server-side resources used by MF2 Feeds
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.79 ▼11.00
Dashboard /wp-admin3.34 ▲0.0349.66 ▼3.01
Posts /wp-admin/edit.php3.39 ▲0.0346.72 ▼6.82
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.06 ▼21.74
Media Library /wp-admin/upload.php3.26 ▲0.0339.16 ▼2.03

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for MF2 Feeds
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.27 ▼0.081.63 ▼0.4543.31 ▼5.60
Dashboard /wp-admin2,195 ▲255.63 ▲0.0187.56 ▼9.7641.48 ▲2.18
Posts /wp-admin/edit.php2,103 ▼01.97 ▼0.0534.17 ▼5.9133.78 ▼4.63
Add New Post /wp-admin/post-new.php1,539 ▲1123.05 ▼0.14638.03 ▼56.3972.75 ▲19.67
Media Library /wp-admin/upload.php1,403 ▼04.21 ▲0.00104.14 ▼4.2944.46 ▼2.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 5× 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/mf2-feed/mf2-feed.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/mf2-feed/includes/feed-jf2.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/mf2-feed/includes/feed-mf2-comments.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/mf2-feed/includes/feed-jf2-comments.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/mf2-feed/includes/feed-mf2.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: microformats, indieweb, rel-alternate, mf2, jf2

mf2-feed/mf2-feed.php Passed 13 tests

"MF2 Feeds" version 3.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Adds a Microformats2 JSON feed for every entry

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
No dangerous file extensions were detected287 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP65797287

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity20.50
▷ Minimum class complexity13.00
▷ Maximum class complexity28.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods969.23%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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