10% add-logo-to-admin

Code Review | Add Logo to Admin

WordPress plugin Add Logo to Admin scored 10% from 54 tests.

About plugin

  • Plugin page: add-logo-to-admin
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3.1
  • WordPress version: 5.9.2
  • First release: Dec 16, 2008
  • Latest release: Sep 30, 2015
  • Number of updates: 57
  • Update frequency: every 43.5 days
  • Top authors: tinkerpriest (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

10,000+ active / 177,372 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/add-logo-to-admin/add-logo-to-admin.php+47
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.35MB] [CPU: ▼308.97ms] Passed 4 tests

An overview of server-side resources used by Add Logo to Admin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0554.77 ▲6.46
Dashboard /wp-admin3.24 ▼0.1619.34 ▼13.21
Posts /wp-admin/edit.php3.30 ▼0.3321.00 ▼13.58
Add New Post /wp-admin/post-new.php6.09 ▼0.8875.13 ▼1,200.81
Media Library /wp-admin/upload.php3.26 ▼0.0418.63 ▼8.27
Add Logo to Admin /wp-admin/options-general.php?page=add-logo-to-admin/add-logo-to-admin.php3.2820.31

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 1 new option
New WordPress options
wp_add_logo_to_admin

Browser metrics Passed 4 tests

An overview of browser requirements for Add Logo to Admin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,774 ▲5215.77 ▼0.275.57 ▼0.042.38 ▼0.18
Dashboard /wp-admin2,911 ▲506.13 ▼0.04119.74 ▼15.50153.70 ▼1.07
Posts /wp-admin/edit.php2,710 ▲163.26 ▲0.0261.04 ▼7.96141.55 ▼2.15
Add New Post /wp-admin/post-new.php1,676 ▲1516.35 ▼0.70400.01 ▲2.40154.82 ▲3.98
Media Library /wp-admin/upload.php1,717 ▲165.53 ▲0.00138.34 ▲6.61184.60 ▼7.20
Add Logo to Admin /wp-admin/options-general.php?page=add-logo-to-admin/add-logo-to-admin.php1,3574.1870.22136.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=add-logo-to-admin/add-logo-to-admin.php
    • > User notice in wp-includes/functions.php+5768
    WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

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
Almost there! Just fix the following items
  • 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/add-logo-to-admin/add-logo-to-admin.php:235

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (The Add Logo to Admin page), #2 (How your logo will appear on the login screen)
Please take inspiration from this readme.txt

add-logo-to-admin/add-logo-to-admin.php Passed 13 tests

Analyzing the main PHP file in "Add Logo to Admin" version 1.6.2
51 characters long description:
Adds a custom logo to your wp-admin and login page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin170 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13292132
JavaScript25132
CSS1006

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png8.94KB4.65KB▼ 47.93%