79% logo-and-address-widget-with-schema

Code Review | Logo and Address Widget with Schema

WordPress plugin Logo and Address Widget with Schema scored79%from 54 tests.

About plugin

  • Plugin page: logo-and-address-...
  • Plugin version: 2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 13, 2018
  • Latest release: Feb 10, 2023
  • Number of updates: 66
  • Update frequency: every 26.7 days
  • Top authors: wsxplugindev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,104 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.48MB] [CPU: ▼53.47ms] Passed 4 tests

An overview of server-side resources used by Logo and Address Widget with Schema
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.51 ▼0.955.90 ▼38.42
Dashboard /wp-admin2.53 ▼0.777.28 ▼43.57
Posts /wp-admin/edit.php2.54 ▼0.836.83 ▼43.86
Add New Post /wp-admin/post-new.php2.53 ▼3.367.51 ▼88.04
Media Library /wp-admin/upload.php2.53 ▼0.706.63 ▼26.03

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_logo-and-address-widget-with-schema
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Logo and Address Widget with Schema
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.30 ▼0.052.28 ▲0.5838.66 ▼7.65
Dashboard /wp-admin2,204 ▲245.61 ▼0.0491.55 ▲0.0841.59 ▼4.39
Posts /wp-admin/edit.php2,106 ▲31.99 ▲0.0240.36 ▲2.4537.53 ▲4.38
Add New Post /wp-admin/post-new.php1,532 ▲423.68 ▲0.60606.09 ▼72.5857.49 ▲5.30
Media Library /wp-admin/upload.php1,406 ▲124.25 ▲0.0894.73 ▼3.0038.62 ▼5.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the laawws-custom-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_logo-and-address-widget-with-schema
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png)
The official readme.txt might help

logo-and-address-widget-with-schema/logo-and-address-widget-with-schema.php Passed 13 tests

Analyzing the main PHP file in "Logo and Address Widget with Schema" version 2.9
74 characters long description:
Widget to add a company logo and address to either the footer or side bar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin862 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3369132670
CSS1192118
JavaScript1291374

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity98.50
▷ Minimum class complexity3.00
▷ Maximum class complexity194.00
Average method complexity22.67
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods990.00%
▷ Protected methods110.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.20MB with 0.16MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
laawws-widget-screen1.png82.40KB23.60KB▼ 71.36%
screenshot-2.png82.40KB23.60KB▼ 71.36%
(invalid) screenshot-1.png37.62KB0.00KB▼ 100.00%