78% custom-site-logo

Code Review | Custom Site Logo

WordPress plugin Custom Site Logo scored78%from 54 tests.

About plugin

  • Plugin page: custom-site-logo
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 21, 2017
  • Latest release: May 26, 2023
  • Number of updates: 54
  • Update frequency: every 40.4 days
  • Top authors: iticiti (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active /69,449 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.63ms] Passed 4 tests

Analyzing server-side resources used by Custom Site Logo
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.15 ▼1.31
Dashboard /wp-admin3.53 ▲0.1855.19 ▼10.38
Posts /wp-admin/edit.php3.58 ▲0.2358.25 ▲4.09
Add New Post /wp-admin/post-new.php6.05 ▲0.16108.43 ▲2.85
Media Library /wp-admin/upload.php3.37 ▲0.1440.18 ▼1.67
Custom Site Logo /wp-admin/themes.php?page=custom-site-logo3.3739.33

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Custom Site Logo: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,047 ▲26115.21 ▲0.845.01 ▲3.0042.12 ▼2.03
Dashboard /wp-admin2,371 ▲1716.45 ▲0.55136.68 ▲21.0241.23 ▼5.96
Posts /wp-admin/edit.php2,269 ▲1693.32 ▲1.3256.20 ▲18.0135.88 ▼1.72
Add New Post /wp-admin/post-new.php1,537 ▲617.69 ▼5.41658.65 ▼25.1737.87 ▼20.14
Media Library /wp-admin/upload.php1,415 ▲154.09 ▼0.1583.96 ▼32.4546.19 ▼2.08
Custom Site Logo /wp-admin/themes.php?page=custom-site-logo1,2353.0637.8131.77

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 did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/custom-site-logo/admin/partials/custom-site-logo-admin-display.php
  • 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-site-logo/admin/partials/custom-site-logo-admin-settings.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-site-logo/admin/partials/custom-site-logo-admin-menu.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-site-logo/public/partials/custom-site-logo-public-shortcodes.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

custom-site-logo/custom-site-logo.php Passed 13 tests

Analyzing the main PHP file in "Custom Site Logo" version 1.0.1
72 characters long description:
This is a plugin to show the custom logo in the site header or anywhere.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin5,191 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS48144,416
PHP14192784545
Markdown1820184
JavaScript2113046

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.20
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods47
▷ Static methods24.26%
▷ Public methods4289.36%
▷ Protected methods00.00%
▷ Private methods510.64%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin