84% owner-info-widget

Code Review | Owner/Brand Info Widget

WordPress plugin Owner/Brand Info Widget scored84%from 54 tests.

About plugin

  • Plugin page: owner-info-widget
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.2
  • WordPress version: 6.3.1
  • First release: Jun 6, 2018
  • Latest release: Jun 1, 2019
  • Number of updates: 3
  • Update frequency: every 120.0 days
  • Top authors: itzpradip (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /552 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by Owner/Brand Info Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.64 ▼3.94
Dashboard /wp-admin3.35 ▲0.0542.83 ▼3.32
Posts /wp-admin/edit.php3.40 ▲0.0444.42 ▼1.90
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.65 ▼6.43
Media Library /wp-admin/upload.php3.27 ▲0.0435.47 ▲1.42

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_pdn_owner_info_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Owner/Brand Info Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.22 ▼1.144.68 ▲2.6943.69 ▼1.12
Dashboard /wp-admin2,209 ▲215.85 ▼0.0197.09 ▼4.5338.45 ▼2.40
Posts /wp-admin/edit.php2,089 ▲31.96 ▼0.0534.91 ▼0.1529.71 ▼8.69
Add New Post /wp-admin/post-new.php1,538 ▲1823.24 ▲0.11664.98 ▼18.1755.31 ▼2.28
Media Library /wp-admin/upload.php1,385 ▼04.22 ▼0.01105.03 ▲5.0447.25 ▼1.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_pdn_owner_info_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/owner-info-widget/index.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt is a good inspiration

owner-info-widget/index.php 92% from 13 tests

The main PHP script in "Owner/Brand Info Widget" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("owner-info-widget.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin417 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP13121241
CSS120115
JavaScript4131461

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity8.25
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/hireme-icon.png17.80KB0.84KB▼ 95.28%