10% metabox-header-color

Code Review | Metabox Header Color

WordPress plugin Metabox Header Color scored10%from 54 tests.

About plugin

  • Plugin page: metabox-header-color
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: May 24, 2010
  • Latest release: Jun 13, 2021
  • Number of updates: 32
  • Update frequency: every 126.2 days
  • Top authors: trepmal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,245 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • This plugin did not install gracefully
    • > User deprecated in wp-includes/functions.php+5747
    Function add_option was called with an argument that is deprecated since version 2.3.0 with no alternative available.

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.92ms] Passed 4 tests

Analyzing server-side resources used by Metabox Header Color
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.11 ▼3.55
Dashboard /wp-admin3.33 ▲0.0251.96 ▼8.38
Posts /wp-admin/edit.php3.38 ▲0.0249.15 ▼4.46
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.87 ▼7.27
Media Library /wp-admin/upload.php3.25 ▲0.0243.78 ▲7.29
Metabox Header Color /wp-admin/options-general.php?page=metabox-header-color/kl-metabox-header-color.php3.2233.44

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
kl-metabox-header-color

Browser metrics Passed 4 tests

Checking browser requirements for Metabox Header Color
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.25 ▼0.131.69 ▼0.0942.82 ▼0.94
Dashboard /wp-admin2,201 ▲275.61 ▼0.0195.74 ▼2.2942.56 ▼1.99
Posts /wp-admin/edit.php2,106 ▲62.00 ▲0.0134.53 ▼4.8633.91 ▼0.82
Add New Post /wp-admin/post-new.php1,531 ▲323.57 ▲0.59696.49 ▲35.2758.68 ▲2.36
Media Library /wp-admin/upload.php1,406 ▲94.10 ▼0.05112.67 ▲10.2047.91 ▲3.10
Metabox Header Color /wp-admin/options-general.php?page=metabox-header-color/kl-metabox-header-color.php1,1822.4061.8326.65

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 does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • kl-metabox-header-color
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/metabox-header-color/uninstall.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/metabox-header-color/kl-metabox-header-color.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

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
3 plugin tags: metabox, mu-compatible, style

metabox-header-color/kl-metabox-header-color.php 92% from 13 tests

"Metabox Header Color" version 1.6.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("metabox-header-color.php" instead of "kl-metabox-header-color.php")

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 plugin121 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2192175
Markdown115029
JavaScript12117

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin