78% featured-image-caption

Code Review | Featured Image Caption

WordPress plugin Featured Image Caption scored78%from 54 tests.

About plugin

  • Plugin page: featured-image-ca...
  • Plugin version: 0.8.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: Apr 10, 2014
  • Latest release: Mar 4, 2021
  • Number of updates: 87
  • Update frequency: every 29.0 days
  • Top authors: cconover (98.85%)someguy9 (2.3%)

Code review

54 tests

User reviews

27 reviews

Install metrics

4,000+ active /58,656 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.13MB] [CPU: ▼3.61ms] Passed 4 tests

Server-side resources used by Featured Image Caption
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.65 ▼1.58
Dashboard /wp-admin3.46 ▲0.1648.23 ▼2.66
Posts /wp-admin/edit.php3.57 ▲0.2248.43 ▼3.44
Add New Post /wp-admin/post-new.php6.05 ▲0.1692.95 ▼6.75
Media Library /wp-admin/upload.php3.38 ▲0.1536.24 ▲0.93
Featured Image Caption /wp-admin/options-general.php?page=ccfic3.3335.65

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
ccfic_options
ccfic_env
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Featured Image Caption
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.21 ▼0.141.84 ▼0.4144.44 ▲1.21
Dashboard /wp-admin2,196 ▲195.51 ▼0.1587.50 ▼3.1141.27 ▲1.15
Posts /wp-admin/edit.php2,104 ▲12.02 ▼0.0040.59 ▲0.5036.50 ▲1.89
Add New Post /wp-admin/post-new.php6,244 ▲4,71825.99 ▲2.79921.24 ▲258.6667.69 ▲16.76
Media Library /wp-admin/upload.php1,407 ▲74.22 ▲0.04101.76 ▼4.1742.27 ▼1.34
Featured Image Caption /wp-admin/options-general.php?page=ccfic8651.9933.9733.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • ccfic_env
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • ccfic_options
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ccfic
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=ccfic
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/featured-image-caption/featured-image-caption.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: shortcode, caption, featured image, image

featured-image-caption/featured-image-caption.php 92% from 13 tests

The principal PHP file in "Featured Image Caption" v. 0.8.10 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin635 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9197589635

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.88
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods42
▷ Static methods00.00%
▷ Public methods2969.05%
▷ Protected methods00.00%
▷ Private methods1330.95%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants7
▷ Global constants7100.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
There were not PNG files found in your plugin