84% icon-widget-with-links

Code Review | Icon Widget

WordPress plugin Icon Widget scored84%from 54 tests.

About plugin

  • Plugin page: icon-widget-with-...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 8, 2018
  • Latest release: Nov 8, 2018
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: philspectrum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /468 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.99ms] Passed 4 tests

Analyzing server-side resources used by Icon Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.29 ▼3.60
Dashboard /wp-admin3.38 ▲0.0749.41 ▼6.22
Posts /wp-admin/edit.php3.49 ▲0.1351.48 ▲0.24
Add New Post /wp-admin/post-new.php5.96 ▲0.0799.62 ▲3.26
Media Library /wp-admin/upload.php3.30 ▲0.0736.47 ▼2.37
Icon Widget /wp-admin/options-general.php?page=icon_widget3.2731.88

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 46 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_icon-widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
icon_widget_settings

Browser metrics Passed 4 tests

Checking browser requirements for Icon Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.27 ▲0.121.91 ▲0.1244.51 ▼0.07
Dashboard /wp-admin2,199 ▲225.59 ▼0.0388.86 ▼10.7140.03 ▼3.02
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0538.16 ▼0.1735.30 ▲0.14
Add New Post /wp-admin/post-new.php1,531 ▼423.04 ▲4.99598.31 ▼90.6262.25 ▼5.24
Media Library /wp-admin/upload.php1,398 ▼54.20 ▼0.0397.76 ▼7.3542.82 ▼9.10
Icon Widget /wp-admin/options-general.php?page=icon_widget8391.9925.5132.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_icon-widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/icon-widget-with-links/views/admin.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: widget, icon, fontawesome

icon-widget-with-links/icon-widget.php 85% from 13 tests

The principal PHP file in "Icon Widget" v. 1.1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("icon-widget-with-links.php" instead of "icon-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin11,436 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
SVG5268,845
PHP91712282,543
Markdown16021
PO File10017
CSS72447
JavaScript21163

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
There are no PNG files in this plugin