83% logo-switcher-divi

Code Review | Logo Switcher Divi

WordPress plugin Logo Switcher Divi scored83%from 54 tests.

About plugin

  • Plugin page: logo-switcher-divi
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 8, 2019
  • Latest release: Feb 4, 2020
  • Number of updates: 38
  • Update frequency: every 8.0 days
  • Top authors: Md. Jahidul Islam (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /4,062 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼12.49ms] Passed 4 tests

Server-side resources used by Logo Switcher Divi
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.17 ▼3.20
Dashboard /wp-admin3.33 ▼0.0253.01 ▼16.06
Posts /wp-admin/edit.php3.38 ▲0.0255.75 ▼3.75
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.49 ▼26.12
Media Library /wp-admin/upload.php3.25 ▲0.0237.05 ▼4.04

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Logo Switcher Divi
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.34 ▼0.011.54 ▼0.3544.25 ▼2.61
Dashboard /wp-admin2,201 ▲245.65 ▼0.0188.77 ▼1.5141.07 ▼1.78
Posts /wp-admin/edit.php2,107 ▲71.98 ▼0.0139.98 ▲1.4737.34 ▲1.95
Add New Post /wp-admin/post-new.php1,542 ▲1418.24 ▼5.00624.37 ▼67.5874.68 ▲22.33
Media Library /wp-admin/upload.php1,409 ▲154.18 ▼0.04100.78 ▼4.1744.82 ▲0.05

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/logo-switcher-divi/uninstall.php
    • > /wp-content/plugins/logo-switcher-divi/logo-switcher-divi.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Requires at least: Invalid version format
  • Screenshots: Please add an image for screenshot #5 (This is the final version)
You can look at the official readme.txt

logo-switcher-divi/logo-switcher-divi.php 92% from 13 tests

The main PHP script in "Logo Switcher Divi" version 1.0.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin131 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP767185114
JavaScript17017

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.25
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods9
▷ Static methods333.33%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin