74% widget-text-icon

Code Review | Widget Text Icon

WordPress plugin Widget Text Icon scored74%from 54 tests.

About plugin

  • Plugin page: widget-text-icon
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5
  • WordPress version: 6.3.1
  • First release: Sep 19, 2012
  • Latest release: May 2, 2013
  • Number of updates: 27
  • Update frequency: every 8.3 days
  • Top authors: aprakasa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,214 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.72MB] [CPU: ▼53.98ms] Passed 4 tests

An overview of server-side resources used by Widget Text Icon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.188.13 ▼38.56
Dashboard /wp-admin2.29 ▼1.0512.25 ▼51.31
Posts /wp-admin/edit.php2.29 ▼1.0611.29 ▼36.84
Add New Post /wp-admin/post-new.php2.29 ▼3.599.72 ▼89.21
Media Library /wp-admin/upload.php2.29 ▼0.949.16 ▼28.14

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_widget-text-icon
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Widget Text Icon
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.29 ▼0.912.03 ▼0.0942.56 ▼3.09
Dashboard /wp-admin2,221 ▲184.84 ▼0.09110.73 ▲2.1242.15 ▲1.28
Posts /wp-admin/edit.php2,100 ▼32.04 ▲0.0441.25 ▲1.5937.90 ▲5.80
Add New Post /wp-admin/post-new.php1,545 ▲1423.36 ▲0.14609.60 ▼73.2852.31 ▼4.04
Media Library /wp-admin/upload.php1,403 ▲64.23 ▼0.03100.92 ▼15.6745.72 ▼3.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Widget_Text_Icon is deprecated since version 4.3.0! Use __construct() instead.
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_widget-text-icon
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/widget-text-icon/widgets-text-icon.php:15

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 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: widget, icons

widget-text-icon/widgets-text-icon.php 85% from 13 tests

The main PHP script in "Widget Text Icon" version 0.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("widget-text-icon.php" instead of "widgets-text-icon.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 209 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected407 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14569351
PO File2141456

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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 were not PNG files found in your plugin