94% change-logo-on-occasions

Code Review | Change Logo On Occasions

WordPress plugin Change Logo On Occasions scored 94% from 54 tests.

About plugin

  • Plugin page: change-logo-on-oc...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 5.8.1
  • First release: Nov 4, 2014
  • Latest release: Nov 11, 2014
  • Number of updates: 5
  • Update frequency: every 1.4 days
  • Top authors: melangercz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 983 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼143.52ms] Passed 4 tests

Server-side resources used by Change Logo On Occasions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1528.86 ▲4.35
Dashboard /wp-admin3.09 ▲0.0457.01 ▲8.31
Posts /wp-admin/edit.php3.18 ▲0.0748.66 ▲0.90
Add New Post /wp-admin/post-new.php5.45 ▲0.0299.17 ▼575.13
Media Library /wp-admin/upload.php3.04 ▲0.0434.98 ▼4.18
Add New /wp-admin/post-new.php?post_type=doodle_logo3.1049.62
Logos /wp-admin/edit.php?post_type=doodle_logo3.0834.51

Server storage [IO: ▲0.01MB] [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: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Change Logo On Occasions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,735 ▲13915.84 ▲0.2710.62 ▲1.5349.90 ▼1.46
Dashboard /wp-admin3,029 ▲995.98 ▼0.19158.16 ▲9.17117.59 ▼4.25
Posts /wp-admin/edit.php2,797 ▲582.70 ▲0.0172.97 ▼6.1093.48 ▼9.71
Add New Post /wp-admin/post-new.php1,535 ▼4618.64 ▼2.02395.55 ▼18.64121.70 ▼22.50
Media Library /wp-admin/upload.php1,804 ▼34.99 ▼0.04158.89 ▼46.19119.25 ▼21.79
Add New /wp-admin/post-new.php?post_type=doodle_logo2,2614.55114.9988.79
Logos /wp-admin/edit.php?post_type=doodle_logo1,4512.6366.5882.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at 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 add_action() in wp-content/plugins/change-logo-on-occasions/change-logo-on-occasions.php:30

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 Passed 29 tests

readme.txt Passed 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
8 plugin tags: time, google, doodle, event management, events...

change-logo-on-occasions/change-logo-on-occasions.php Passed 13 tests

The principal PHP file in "Change Logo On Occasions" v. 1.0 is loaded by WordPress automatically on each request
84 characters long description:
Change logos on certain occasions (e.g. Christmas, Halloween) just like Google does.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected132 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1172798
PO File15634

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
There were not PNG files found in your plugin