10% add-logo-to-admin

Code Review | Add Logo to Admin

WordPress plugin Add Logo to Admin scored10%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: 6.3.1
  • 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 /180,058 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > 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.20MB] [CPU: ▼20.32ms] 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.51 ▲0.0539.75 ▼10.25
Dashboard /wp-admin3.11 ▼0.2427.82 ▼51.74
Posts /wp-admin/edit.php3.25 ▼0.1139.37 ▼10.76
Add New Post /wp-admin/post-new.php5.48 ▼0.4082.03 ▼8.52
Media Library /wp-admin/upload.php3.19 ▼0.0431.93 ▼8.20
Add Logo to Admin /wp-admin/options-general.php?page=add-logo-to-admin/add-logo-to-admin.php3.2130.52

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
wp_add_logo_to_admin

Browser metrics Passed 4 tests

A check of browser resources used by Add Logo to Admin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.21 ▼0.082.07 ▼0.4147.78 ▼23.04
Dashboard /wp-admin2,213 ▲365.65 ▼0.0295.85 ▼1.6940.97 ▼2.34
Posts /wp-admin/edit.php2,121 ▲422.06 ▲0.0550.82 ▲12.3941.97 ▲5.91
Add New Post /wp-admin/post-new.php1,538 ▼623.01 ▼0.34719.13 ▲44.3166.24 ▲1.55
Media Library /wp-admin/upload.php1,418 ▲214.25 ▼0.01104.24 ▲2.2444.94 ▼0.94
Add Logo to Admin /wp-admin/options-general.php?page=add-logo-to-admin/add-logo-to-admin.php1,0623.0742.2769.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > 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+5905
    Function 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: 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

"Add Logo to Admin" version 1.6.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected170 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13292132
JavaScript25132
CSS1006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
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%