84% header-image-uploader

Code Review | Header Image Uploader

WordPress plugin Header Image Uploader scored84%from 54 tests.

About plugin

  • Plugin page: header-image-uplo...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1
  • WordPress version: 6.3.1
  • First release: Sep 1, 2014
  • Latest release: Mar 6, 2019
  • Number of updates: 12
  • Update frequency: every 137.5 days
  • Top authors: imran3229 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,711 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.82ms] Passed 4 tests

Server-side resources used by Header Image Uploader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.84 ▼0.88
Dashboard /wp-admin3.31 ▲0.0152.20 ▼1.16
Posts /wp-admin/edit.php3.36 ▲0.0052.14 ▲0.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.61 ▼9.30
Media Library /wp-admin/upload.php3.23 ▲0.0038.35 ▲1.70

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Header Image Uploader
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.34 ▼0.041.77 ▼0.1741.97 ▼1.35
Dashboard /wp-admin2,195 ▲155.55 ▼0.0991.38 ▲4.3638.52 ▼5.53
Posts /wp-admin/edit.php2,106 ▲32.00 ▲0.0541.42 ▼1.9238.08 ▼3.16
Add New Post /wp-admin/post-new.php6,247 ▲4,72118.95 ▼4.60948.12 ▲308.7965.30 ▲17.56
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.01110.01 ▲7.2846.58 ▲5.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/header-image-uploader/header-image-uploader.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Uploader field), #2 (WordPress media uploader), #3 (Image uploaded), #4 (Image selected)
  • Contributors: Plugin contributors not specified
The official readme.txt might help

header-image-uploader/header-image-uploader.php Passed 13 tests

"Header Image Uploader" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
85 characters long description:
A Simple WordPress plugin that adds header image uploader meta box in the post admin.

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

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.75
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.42MB with 0.25MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png4.23KB2.94KB▼ 30.67%
screenshot-3.png313.96KB79.94KB▼ 74.54%
screenshot-2.png29.94KB13.88KB▼ 53.64%
screenshot-4.png83.25KB20.90KB▼ 74.89%