84% custom-header-extended

Code Review | Custom Header Extended

WordPress plugin Custom Header Extended scored84%from 54 tests.

About plugin

  • Plugin page: custom-header-ext...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6+
  • WordPress version: 6.3.1
  • First release: Sep 27, 2013
  • Latest release: Jul 9, 2015
  • Number of updates: 5
  • Update frequency: every 130.0 days
  • Top authors: greenshady (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /59,310 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼15.05ms] Passed 4 tests

Analyzing server-side resources used by Custom Header Extended
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.26 ▲0.84
Dashboard /wp-admin3.42 ▲0.0748.60 ▼24.95
Posts /wp-admin/edit.php3.53 ▲0.1747.95 ▼5.55
Add New Post /wp-admin/post-new.php6.02 ▲0.1386.98 ▼27.55
Media Library /wp-admin/upload.php3.34 ▲0.1133.66 ▼2.16

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Custom Header Extended
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.35 ▲0.002.27 ▲0.3243.90 ▲1.97
Dashboard /wp-admin2,192 ▲185.49 ▼0.0991.09 ▲1.4440.76 ▼2.19
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0036.12 ▼5.4634.28 ▼1.15
Add New Post /wp-admin/post-new.php1,526 ▼223.18 ▲0.03668.17 ▼22.9358.15 ▲1.84
Media Library /wp-admin/upload.php1,391 ▼94.13 ▲0.01101.22 ▼17.2044.23 ▼3.40

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-header-extended/inc/class-custom-headers-filter.php:129
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-header-extended/custom-header-extended.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/custom-header-extended/admin/class-custom-headers-admin.php:82

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Custom header meta box.), #2 (Custom header meta box on the edit post screen.), #3 (Custom header on a single post page.)
You can look at the official readme.txt

custom-header-extended/custom-header-extended.php 92% from 13 tests

The entry point to "Custom Header Extended" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 254 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin901 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
Markdown31230359
PHP3179534358
JavaScript25159110
PO File1232474

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.51
Average class complexity31.33
▷ Minimum class complexity4.00
▷ Maximum class complexity46.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes3100.00%
Methods26
▷ Static methods415.38%
▷ Public methods26100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.30MB with 0.16MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png41.45KB18.45KB▼ 55.48%
screenshot-2.png232.93KB85.72KB▼ 63.20%
screenshot-1.png33.83KB19.69KB▼ 41.80%