84% custom-featured-image-metabox

Code Review | Custom Featured Image Metabox

WordPress plugin Custom Featured Image Metabox scored84%from 54 tests.

About plugin

  • Plugin page: custom-featured-i...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Jun 1, 2014
  • Latest release: Jan 1, 2015
  • Number of updates: 9
  • Update frequency: every 23.8 days
  • Top authors: 1fixdotio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,448 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.55ms] Passed 4 tests

This is a short check of server-side resources used by Custom Featured Image Metabox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.13 ▼2.21
Dashboard /wp-admin3.39 ▲0.0955.96 ▲1.02
Posts /wp-admin/edit.php3.51 ▲0.1549.56 ▲2.41
Add New Post /wp-admin/post-new.php5.98 ▲0.09100.71 ▼11.42
Media Library /wp-admin/upload.php3.32 ▲0.0937.74 ▲4.22
Custom Featured Image Metabox /wp-admin/options-general.php?page=cfim3.2832.00

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 9 new options
New WordPress options
cfim_post
cfim_page
widget_recent-comments
cfim-display-activation-message
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Featured Image Metabox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.76 ▲0.121.78 ▼0.3840.30 ▼3.80
Dashboard /wp-admin2,202 ▲225.56 ▼0.0587.28 ▼4.6338.14 ▼6.15
Posts /wp-admin/edit.php2,104 ▲11.94 ▼0.0135.84 ▼3.2233.88 ▲0.91
Add New Post /wp-admin/post-new.php1,537 ▲1118.26 ▼4.61611.05 ▼74.1068.27 ▲10.97
Media Library /wp-admin/upload.php1,407 ▲44.20 ▼0.05103.57 ▼1.0042.72 ▼4.18
Custom Featured Image Metabox /wp-admin/options-general.php?page=cfim8501.9922.8125.89

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/custom-featured-image-metabox/admin/views/admin.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Custom_Featured_Image_Metabox' not found in wp-content/plugins/custom-featured-image-metabox/admin/includes/settings.php:34

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 96% from 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
2 plugin tags: metabox, featured image

custom-featured-image-metabox/custom-featured-image-metabox.php 92% from 13 tests

The main PHP file in "Custom Featured Image Metabox" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important 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 review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected394 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7178357344
PO File1131850

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.67
▷ Minimum class complexity9.00
▷ Maximum class complexity17.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods828.57%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin