90% dynamic-featured-image

Code Review | Dynamic Featured Image

WordPress plugin Dynamic Featured Image scored90%from 54 tests.

About plugin

  • Plugin page: dynamic-featured-...
  • Plugin version: 3.7.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.6
  • WordPress version: 6.3.1
  • First release: Sep 20, 2013
  • Latest release: Jan 29, 2021
  • Number of updates: 154
  • Update frequency: every 17.5 days
  • Top authors: ankitpokhrel (100%)

Code review

54 tests

User reviews

56 reviews

Install metrics

90,000+ active /906,602 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.22ms] Passed 4 tests

An overview of server-side resources used by Dynamic Featured Image
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.02 ▼0.48
Dashboard /wp-admin3.33 ▲0.0347.72 ▼8.39
Posts /wp-admin/edit.php3.38 ▲0.0352.54 ▼0.19
Add New Post /wp-admin/post-new.php5.98 ▲0.0997.53 ▼3.82
Media Library /wp-admin/upload.php3.26 ▲0.0339.83 ▲4.79

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Dynamic Featured Image
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.34 ▲0.051.54 ▼0.1445.34 ▲4.59
Dashboard /wp-admin2,245 ▲685.66 ▲0.0088.55 ▼2.0444.80 ▼2.04
Posts /wp-admin/edit.php2,154 ▲542.13 ▲0.1636.74 ▲1.8436.82 ▲0.22
Add New Post /wp-admin/post-new.php6,307 ▲4,78120.91 ▼2.27859.70 ▲196.7374.22 ▲11.56
Media Library /wp-admin/upload.php1,456 ▲594.18 ▼0.00103.28 ▲2.0843.49 ▼3.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: multiple featured image, featured image, dynamic featured image, post thumbnail, multiple post thumbnail...

dynamic-featured-image/dynamic-featured-image.php Passed 13 tests

The principal PHP file in "Dynamic Featured Image" v. 3.7.0 is loaded by WordPress automatically on each request
116 characters long description:
Dynamically adds multiple featured image or post thumbnail functionality to your posts, pages and custom post types.

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
There were no executable files found in this plugin1,227 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP3156639537
PO File101530506
JavaScript13520115
CSS115769

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity35.00
▷ Minimum class complexity9.00
▷ Maximum class complexity61.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods48
▷ Static methods00.00%
▷ Public methods3368.75%
▷ Protected methods1020.83%
▷ Private methods510.42%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
PNG images were not found in this plugin