84% kin-icon-picker

Code Review | Kin Icon Picker

WordPress plugin Kin Icon Picker scored84%from 54 tests.

About plugin

  • Plugin page: kin-icon-picker
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2023
  • Latest release: Feb 3, 2023
  • Number of updates: 2
  • Update frequency: every 4.5 days
  • Top authors: plovinicius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /650 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Kin Icon Picker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.97 ▲1.56
Dashboard /wp-admin3.31 ▲0.0048.06 ▲3.22
Posts /wp-admin/edit.php3.36 ▲0.0042.89 ▼7.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.38 ▼15.59
Media Library /wp-admin/upload.php3.23 ▲0.0032.78 ▼0.11

Server storage [IO: ▲0.86MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Kin Icon Picker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.18 ▼0.411.76 ▲0.0543.42 ▲1.79
Dashboard /wp-admin2,195 ▲215.57 ▼0.1486.99 ▲0.6138.41 ▼2.16
Posts /wp-admin/edit.php2,100 ▲32.02 ▼0.0134.27 ▼0.9737.33 ▲3.37
Add New Post /wp-admin/post-new.php1,530 ▲423.21 ▲0.01615.13 ▼50.6046.20 ▼5.74
Media Library /wp-admin/upload.php1,394 ▼64.21 ▼0.02100.16 ▲2.3338.71 ▼5.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kin-icon-picker/admin/partials/kin-icon-picker-admin-settings-display.php:2

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 issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: meta, fields, icomoon, acf, icon...

kin-icon-picker/kin-icon-picker.php Passed 13 tests

The primary PHP file in "Kin Icon Picker" version 1.0.0 is used by WordPress to initiate all plugin functionality
68 characters long description:
Powerful plugin to add Icons support to a known custom fields plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected18,037 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JSON30012,332
JavaScript109915144,938
PHP12153491502
Sass6343194
Markdown426037
CSS34434

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.21
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3284.21%
▷ Protected methods00.00%
▷ Private methods615.79%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 compressed PNG files occupy 0.09MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/generate-icons.png12.32KB13.49KB0.00%
assets/images/icons-dropdown.png3.94KB3.77KB▼ 4.41%
assets/images/create-project.png9.26KB9.75KB0.00%
assets/images/load-project.png3.16KB3.38KB0.00%
assets/images/import-icons.png3.05KB3.26KB0.00%