84% dicode-icons-pack

Code Review | Dicode Icons Pack

WordPress plugin Dicode Icons Pack scored84%from 54 tests.

About plugin

  • Plugin page: dicode-icons-pack
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 9, 2022
  • Latest release: May 17, 2023
  • Number of updates: 5
  • Update frequency: every 31.8 days
  • Top authors: designinvento (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /424 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.07MB] [CPU: ▲2.09ms] Passed 4 tests

An overview of server-side resources used by Dicode Icons Pack
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.10 ▲1.67
Dashboard /wp-admin3.40 ▲0.1052.97 ▲2.62
Posts /wp-admin/edit.php3.51 ▲0.1655.38 ▲2.92
Add New Post /wp-admin/post-new.php5.96 ▲0.0796.34 ▲2.19
Media Library /wp-admin/upload.php3.30 ▲0.0735.06 ▲1.89
Icons Search /wp-admin/admin.php?page=dicode_icons_lib3.3242.93
Settings /wp-admin/admin.php?page=dicodeicons3.3037.83

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 135 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
dicode_icons_activation
can_compress_scripts
dicode_icons_changelog
widget_recent-posts

Browser metrics Passed 4 tests

Dicode Icons Pack: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,985 ▲25015.06 ▲0.741.68 ▼0.1143.12 ▼1.44
Dashboard /wp-admin2,385 ▲1976.63 ▲0.74138.15 ▲26.5541.60 ▲2.01
Posts /wp-admin/edit.php2,288 ▲2023.54 ▲1.5157.13 ▲22.1834.51 ▼0.08
Add New Post /wp-admin/post-new.php1,547 ▲1417.78 ▼5.40594.60 ▼6.9928.16 ▼22.16
Media Library /wp-admin/upload.php1,430 ▲424.26 ▲0.0982.11 ▼16.9241.02 ▼0.44
Icons Search /wp-admin/admin.php?page=dicode_icons_lib14,2384.0159.68192.43
Settings /wp-admin/admin.php?page=dicodeicons1,3263.4347.6329.27

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 were found after uninstall: 8 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • dicode_icons_changelog
    • dicode_icons_activation
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just 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 esc_html_e() in wp-content/plugins/dicode-icons-pack/admin/settings-api/icon-library.php:6

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: font icons, icon fonts, custom icons, elementor, icons

dicode-icons-pack/dicode-icons-pack.php Passed 13 tests

The principal PHP file in "Dicode Icons Pack" v. 1.1.0 is loaded by WordPress automatically on each request
90 characters long description:
This plugin provide ability to have custom icons based on free and premium icon libraries.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin36,022 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
SVG160616,327
PHP3048659115,562
CSS1721424,080
JavaScript2152053

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity6.76
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods97
▷ Static methods4748.45%
▷ Public methods9294.85%
▷ Protected methods00.00%
▷ Private methods55.15%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.16MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/copy-icon.png1.56KB0.76KB▼ 51.44%
assets/images/copy.png161.68KB58.31KB▼ 63.93%