10% smartifw

Code Review | Smart Icons For WordPress

WordPress plugin Smart Icons For WordPress scored10%from 54 tests.

About plugin

  • Plugin page: smartifw
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.0
  • WordPress version: 6.3.1
  • First release: Oct 7, 2014
  • Latest release: Sep 17, 2016
  • Number of updates: 27
  • Update frequency: every 26.5 days
  • Top authors: smartpixels (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /16,330 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/smartifw/smart_icons_for_wordpress.php+55
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.03MB] [CPU: ▼45.99ms] Passed 4 tests

A check of server-side resources used by Smart Icons For WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.94 ▼0.5214.30 ▼23.76
Dashboard /wp-admin2.99 ▼0.3517.08 ▼41.78
Posts /wp-admin/edit.php2.99 ▼0.3617.27 ▼32.93
Add New Post /wp-admin/post-new.php2.99 ▼2.8916.98 ▼85.48
Media Library /wp-admin/upload.php2.99 ▼0.2318.16 ▼13.77
Add-ons /wp-admin/admin.php?page=smart-ifw-pro-addons-page2.9915.46
SmartIcons /wp-admin/admin.php?page=smart-icons-for-wordpress2.9916.00

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
_smart_ifw_options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Smart Icons For WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲10714.78 ▲0.431.83 ▲0.0542.49 ▲1.03
Dashboard /wp-admin2,235 ▲474.89 ▼0.0397.96 ▼13.1176.16 ▲35.33
Posts /wp-admin/edit.php2,121 ▲501.98 ▼0.0338.08 ▼0.6433.76 ▼2.18
Add New Post /wp-admin/post-new.php1,727 ▲19418.27 ▼4.81722.80 ▲121.9037.38 ▼17.61
Media Library /wp-admin/upload.php1,411 ▲204.23 ▲0.0994.70 ▼11.1772.69 ▲29.80
Add-ons /wp-admin/admin.php?page=smart-ifw-pro-addons-page9961.9932.5027.97
SmartIcons /wp-admin/admin.php?page=smart-icons-for-wordpress1,0651.9128.6848.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • _smart_ifw_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smart-icons-for-wordpress
    • > Notice in wp-content/plugins/smartifw/includes/scripts.php+23
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smart-icons-for-wordpress
    • > User notice in wp-includes/functions.php+5905
    Function add_shortcode was called incorrectly. Invalid shortcode name: Empty name given. Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/smartifw/smart_icons_for_wordpress.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: Too many tags (78 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

smartifw/smart_icons_for_wordpress.php 85% from 13 tests

The principal PHP file in "Smart Icons For WordPress" v. 1.0.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smartifw.php" instead of "smart_icons_for_wordpress.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin1,705 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP7109671,106
SVG100565
CSS44423
JavaScript3147
Markdown2204

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/css/chosen-sprite.png0.53KB0.88KB0.00%
images/menu-icon.png0.48KB0.39KB▼ 19.88%