84% get-widget-id

Code Review | Get Widget ID

WordPress plugin Get Widget ID scored84%from 54 tests.

About plugin

  • Plugin page: get-widget-id
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.2.4
  • WordPress version: 6.3.1
  • First release: Apr 11, 2015
  • Latest release: Oct 19, 2019
  • Number of updates: 7
  • Update frequency: every 236.3 days
  • Top authors: a.ankit (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /8,052 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.79ms] Passed 4 tests

Server-side resources used by Get Widget ID
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.43 ▼7.47
Dashboard /wp-admin3.31 ▲0.0142.60 ▼8.57
Posts /wp-admin/edit.php3.36 ▲0.0049.27 ▼2.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.10 ▼4.49
Media Library /wp-admin/upload.php3.23 ▲0.0035.98 ▲1.67

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Get Widget ID
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.141.70 ▼0.1037.58 ▼13.27
Dashboard /wp-admin2,209 ▲185.91 ▲0.01112.82 ▼0.6741.62 ▼1.37
Posts /wp-admin/edit.php2,086 ▼02.00 ▼0.0640.00 ▼0.2737.14 ▲1.07
Add New Post /wp-admin/post-new.php1,513 ▼2023.56 ▲0.47600.28 ▼63.3948.33 ▼11.53
Media Library /wp-admin/upload.php1,382 ▼94.20 ▼0.0295.29 ▼2.1641.12 ▼1.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% 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 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/get-widget-id/get-widget-id.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (ID inside a Text Widget)
You can look at the official readme.txt

get-widget-id/get-widget-id.php 92% from 13 tests

The principal PHP file in "Get Widget ID" v. 1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1202310

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions1
▷ Named functions1100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png14.43KB6.50KB▼ 54.94%