84% widget-icon

Code Review | Widget Icon

WordPress plugin Widget Icon scored84%from 54 tests.

About plugin

  • Plugin page: widget-icon
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.7.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2013
  • Latest release: Dec 9, 2013
  • Number of updates: 24
  • Update frequency: every 10.0 days
  • Top authors: dfactory (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /23,149 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Widget Icon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.81 ▲0.82
Dashboard /wp-admin3.32 ▲0.0145.65 ▼10.22
Posts /wp-admin/edit.php3.37 ▲0.0146.30 ▼0.83
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.04 ▼24.20
Media Library /wp-admin/upload.php3.24 ▲0.0133.08 ▼1.41

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Widget Icon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.13 ▼1.631.62 ▼0.1641.41 ▲1.46
Dashboard /wp-admin2,203 ▲155.80 ▼0.0499.97 ▼11.4841.14 ▼3.35
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0439.92 ▼1.8135.43 ▼1.51
Add New Post /wp-admin/post-new.php1,533 ▲523.53 ▲5.47685.92 ▲74.8257.99 ▲5.89
Media Library /wp-admin/upload.php1,391 ▲94.22 ▼0.0399.78 ▼0.4441.05 ▼3.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-icon/widget-icon.php:713

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 to be fixed:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

widget-icon/widget-icon.php 92% from 13 tests

The primary PHP file in "Widget Icon" version 1.1.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

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
No dangerous file extensions were detected4,287 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS66542,139
PHP27152919
SVG200697
JavaScript2101363
PO File2120212120
Markdown221049

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity59.00
▷ Minimum class complexity59.00
▷ Maximum class complexity59.00
Average method complexity7.44
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo-dfactory.png2.92KB1.92KB▼ 34.20%