10% media-feed

Code Review | Media Feed

WordPress plugin Media Feed scored10%from 54 tests.

About plugin

  • Plugin page: media-feed
  • Plugin version: 2.08
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Sep 27, 2017
  • Latest release: Oct 29, 2023
  • Number of updates: 69
  • Update frequency: every 32.2 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /5,232 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/media-feed/lib/class-mediafeed.php+66
    Trying to access array offset on value of type bool

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

An overview of server-side resources used by Media Feed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2037.07 ▼5.35
Dashboard /wp-admin3.49 ▲0.1945.06 ▼3.18
Posts /wp-admin/edit.php3.60 ▲0.2549.80 ▲1.13
Add New Post /wp-admin/post-new.php6.08 ▲0.2082.16 ▼10.88
Media Library /wp-admin/upload.php3.41 ▲0.1936.87 ▲0.06
Feed /wp-admin/upload.php?page=mediafeed-settings3.4032.18

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
media_feed_options
widget_mediafeedwidgetitem
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
media_feed_widget

Browser metrics Passed 4 tests

A check of browser resources used by Media Feed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.28 ▼0.291.68 ▼0.1038.72 ▼6.30
Dashboard /wp-admin2,196 ▲155.59 ▼0.1287.70 ▼12.4738.20 ▼2.07
Posts /wp-admin/edit.php2,083 ▼172.10 ▲0.0838.73 ▲1.5736.64 ▼5.31
Add New Post /wp-admin/post-new.php6,196 ▲4,66819.21 ▼3.98951.70 ▲243.2652.94 ▼1.25
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.0394.65 ▼4.8139.75 ▼2.11
Feed /wp-admin/upload.php?page=mediafeed-settings1,2867.49206.2531.29

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_mediafeedwidgetitem
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/media-feed/lib/class-mediafeed.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-feed/lib/class-mediafeedadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-feed/lib/class-mediafeedregist.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-feed/lib/class-mediafeedregist.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-feed/lib/class-mediafeedwidgetitem.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: media, feed, rss

media-feed/mediafeed.php 92% from 13 tests

The principal PHP file in "Media Feed" v. 2.08 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("media-feed.php" instead of "mediafeed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,207 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP8150341840
JavaScript5284279
JSON20040
CSS20029
Sass10019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity20.25
▷ Minimum class complexity3.00
▷ Maximum class complexity47.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
No PNG images were found in this plugin