84% add-image-to-feed

Code Review | Add Image to Feed

WordPress plugin Add Image to Feed scored84%from 54 tests.

About plugin

  • Plugin page: add-image-to-feed
  • Plugin version: 1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 9, 2022
  • Latest release: Apr 15, 2022
  • Number of updates: 9
  • Update frequency: every 7.2 days
  • Top authors: lesion (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /738 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.18ms] Passed 4 tests

An overview of server-side resources used by Add Image to Feed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.08 ▼9.16
Dashboard /wp-admin3.31 ▲0.0150.46 ▼1.04
Posts /wp-admin/edit.php3.36 ▲0.0047.15 ▼6.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.78 ▼7.60
Media Library /wp-admin/upload.php3.23 ▲0.0042.25 ▲7.80

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Add Image to Feed
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.161.80 ▼0.0643.31 ▼2.89
Dashboard /wp-admin2,206 ▲185.83 ▲0.8796.85 ▼19.2742.14 ▼1.57
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0239.32 ▲2.4333.00 ▼5.72
Add New Post /wp-admin/post-new.php1,533 ▲1423.35 ▲0.21667.42 ▼24.1054.91 ▲3.94
Media Library /wp-admin/upload.php1,391 ▼04.13 ▼0.07110.58 ▲9.6448.28 ▲4.05

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

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 fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/add-image-to-feed/add-img-to-feed.php

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: enclosure, mediacontent, itunesimage, feed, podcast

add-image-to-feed/add-img-to-feed.php 92% from 13 tests

The main PHP script in "Add Image to Feed" version 1.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add-image-to-feed.php" instead of "add-img-to-feed.php")

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
No dangerous file extensions were detected29 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131729

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin