84% themify-icons

Code Review | Themify Icons

WordPress plugin Themify Icons scored84%from 54 tests.

About plugin

  • Plugin page: themify-icons
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Dec 3, 2016
  • Latest release: Nov 4, 2023
  • Number of updates: 52
  • Update frequency: every 48.5 days
  • Top authors: themifyme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active /34,705 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.00ms] Passed 4 tests

This is a short check of server-side resources used by Themify Icons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1038.52 ▲2.45
Dashboard /wp-admin3.46 ▲0.1245.98 ▼16.08
Posts /wp-admin/edit.php3.57 ▲0.2246.82 ▲0.79
Add New Post /wp-admin/post-new.php6.05 ▲0.1685.45 ▼2.08
Media Library /wp-admin/upload.php3.38 ▲0.1536.98 ▲1.39

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Themify Icons: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7314.73 ▲0.791.52 ▲0.0137.89 ▼2.75
Dashboard /wp-admin2,219 ▲395.54 ▼0.1191.40 ▼4.1038.89 ▼1.47
Posts /wp-admin/edit.php2,116 ▲161.97 ▼0.0241.56 ▲5.4637.00 ▲0.24
Add New Post /wp-admin/post-new.php6,329 ▲4,80323.35 ▲0.11893.73 ▲228.9865.46 ▲3.98
Media Library /wp-admin/upload.php1,422 ▲224.17 ▼0.0195.57 ▼15.3641.52 ▼4.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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
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
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themify-icons/includes/admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themify-icons/includes/widget-icons.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themify-icons/includes/menu-icons.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/themify-icons/includes/shortcode.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/themify-icons/templates/icon-picker.php:7

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: menu, admin, editor, menu-items, icon...

themify-icons/init.php 92% from 13 tests

The main file in "Themify Icons" v. 2.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("themify-icons.php" instead of "init.php")

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 detected2,418 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS616301,436
PHP96152832
JavaScript2151127
HTML10023

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/favicon.png0.75KB0.67KB▼ 10.91%