83% filter-featured-image

Code Review | Filter Featured Image

WordPress plugin Filter Featured Image scored83%from 54 tests.

About plugin

  • Plugin page: filter-featured-i...
  • Plugin version: 0.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5,9-5.9
  • WordPress version: 6.3.1
  • First release: Apr 8, 2022
  • Latest release: Apr 8, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: bestony (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /495 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Filter Featured Image
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.44 ▼3.87
Dashboard /wp-admin3.31 ▲0.0147.65 ▼5.67
Posts /wp-admin/edit.php3.36 ▲0.0149.20 ▲0.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.43 ▼0.59
Media Library /wp-admin/upload.php3.23 ▲0.0034.33 ▼0.16

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Filter Featured Image
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.135.34 ▲3.4038.32 ▼5.94
Dashboard /wp-admin2,206 ▲185.91 ▲1.03108.08 ▼5.9139.47 ▼5.58
Posts /wp-admin/edit.php2,111 ▲222.03 ▼0.0139.59 ▲4.4237.21 ▲1.39
Add New Post /wp-admin/post-new.php1,519 ▲522.77 ▲5.28586.46 ▼103.4746.14 ▼6.24
Media Library /wp-admin/upload.php1,391 ▲34.27 ▲0.0197.70 ▲2.3640.77 ▼2.71

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/filter-featured-image/filter-featured-image.php:21

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 90% 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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Dropdown) image not found
Please take inspiration from this readme.txt

filter-featured-image/filter-featured-image.php 85% from 13 tests

"Filter Featured Image" version 0.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Requires at least: Required version number should use periods and dots only (ex. "7.0" instead of "5,9")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Good job! No executable or dangerous file extensions detected38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121438

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected