84% universal-icons

Code Review | Universal Icons

WordPress plugin Universal Icons scored84%from 54 tests.

About plugin

  • Plugin page: universal-icons
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.5.2
  • WordPress version: 6.3.1
  • First release: May 18, 2016
  • Latest release: Jun 13, 2016
  • Number of updates: 14
  • Update frequency: every 1.9 days
  • Top authors: rktaiwala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,236 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Universal Icons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.66 ▼2.44
Dashboard /wp-admin3.35 ▲0.0547.81 ▼0.04
Posts /wp-admin/edit.php3.40 ▲0.0544.39 ▼4.53
Add New Post /wp-admin/post-new.php5.93 ▲0.0591.72 ▼9.74
Media Library /wp-admin/upload.php3.27 ▲0.0536.36 ▲3.41

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Universal Icons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7714.47 ▼0.311.78 ▲0.0543.30 ▼7.12
Dashboard /wp-admin2,215 ▲274.86 ▼0.03105.12 ▲3.9343.04 ▼0.67
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0436.65 ▼3.7335.62 ▲0.15
Add New Post /wp-admin/post-new.php1,521 ▼2323.26 ▲5.05640.02 ▲35.7751.68 ▼3.12
Media Library /wp-admin/upload.php1,397 ▲94.30 ▲0.0991.84 ▼6.8939.82 ▼5.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/universal-icons/classes/TsUniversalIconsWidgetFilters.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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 your attention: You can take inspiration from this readme.txt

universal-icons/tsiconsuniversalfree.php 92% from 13 tests

The entry point to "Universal Icons" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("universal-icons.php" instead of "tsiconsuniversalfree.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,764 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
SVG103967
CSS135586
PHP25679211

PHP code Passed 2 tests

A short 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.35
Average class complexity18.00
▷ Minimum class complexity17.00
▷ Maximum class complexity19.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods1292.31%
▷ Public methods13100.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

All PNG images should be compressed to minimize bandwidth usage for end users
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/adminIcon.png0.39KB0.28KB▼ 26.58%