84% featured-image-in-all-posts

Code Review | Featured Image in Content

WordPress plugin Featured Image in Content scored84%from 54 tests.

About plugin

  • Plugin page: featured-image-in...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 6.3.1
  • First release: May 18, 2022
  • Latest release: May 18, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: anuarsaba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /187 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.33MB] [CPU: ▼19.97ms] Passed 4 tests

Server-side resources used by Featured Image in Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0336.95 ▼7.13
Dashboard /wp-admin3.31 ▲0.0149.45 ▼4.32
Posts /wp-admin/edit.php3.36 ▲0.0049.36 ▼5.88
Add New Post /wp-admin/post-new.php4.61 ▼1.2943.70 ▼62.53
Media Library /wp-admin/upload.php3.24 ▲0.0036.14 ▼0.80

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

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

Browser metrics Passed 4 tests

Featured Image in Content: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.68 ▲0.331.73 ▼0.4645.36 ▲1.23
Dashboard /wp-admin2,195 ▲155.67 ▼0.0090.23 ▼1.6342.71 ▼2.99
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0035.60 ▼3.5934.29 ▼4.31
Add New Post /wp-admin/post-new.php1,526 ▼023.27 ▲0.06706.46 ▲41.6658.65 ▼2.85
Media Library /wp-admin/upload.php1,394 ▼64.23 ▲0.0399.89 ▼4.3042.12 ▼0.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/featured-image-in-all-posts/featured-image-in-content.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Featured image in an image-format post with only a title and featured, displayed in Twenty Ten (which doesn't support featured images). Without the plugin, only the post title displays.) image missing
You can look at the official readme.txt

featured-image-in-all-posts/featured-image-in-content.php 92% from 13 tests

The main PHP script in "Featured Image in Content" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("featured-image-in-all-posts.php" instead of "featured-image-in-content.php")

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 detected9 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15249

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner-772x250.png43.17KB20.78KB▼ 51.87%
icon-256x256.png38.10KB18.63KB▼ 51.12%