10% tooltip-icons-for-products

Code Review | Tooltip Icons for Products

WordPress plugin Tooltip Icons for Products scored10%from 54 tests.

About plugin

  • Plugin page: tooltip-icons-for...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.4-5.4
  • WordPress version: 6.3.1
  • First release: Apr 21, 2020
  • Latest release: May 13, 2020
  • Number of updates: 6
  • Update frequency: every 3.7 days
  • Top authors: desparza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /440 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/tooltip-icons-for-products/includes/wp-tooltip-icons-products-functions.php+9
    Use of undefined constant enable_icons - assumed 'enable_icons' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.95MB] [CPU: ▼59.51ms] Passed 4 tests

An overview of server-side resources used by Tooltip Icons for Products
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.415.58 ▼37.99
Dashboard /wp-admin2.07 ▼1.287.35 ▼56.91
Posts /wp-admin/edit.php2.07 ▼1.296.51 ▼44.73
Add New Post /wp-admin/post-new.php2.07 ▼3.826.10 ▼98.41
Media Library /wp-admin/upload.php2.07 ▼1.167.07 ▼27.63
Sobre Daniel Esparza /wp-admin/admin.php?page=desparza-menu2.076.33
Tooltip Icons for Products /wp-admin/admin.php?page=dewp-tip-admin-settings2.076.84

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Tooltip Icons for Products
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲5314.28 ▼0.281.94 ▼0.1442.22 ▼0.40
Dashboard /wp-admin2,223 ▲435.60 ▼0.1195.02 ▲8.0646.25 ▲6.69
Posts /wp-admin/edit.php2,128 ▲281.97 ▼0.0341.33 ▲0.8837.51 ▲0.35
Add New Post /wp-admin/post-new.php1,547 ▲2123.34 ▲0.11669.13 ▲22.9152.92 ▼1.82
Media Library /wp-admin/upload.php1,422 ▲224.23 ▼0.01136.67 ▲34.5554.43 ▲8.17
Sobre Daniel Esparza /wp-admin/admin.php?page=desparza-menu8142.0026.6231.98
Tooltip Icons for Products /wp-admin/admin.php?page=dewp-tip-admin-settings1,0662.0022.6232.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/tooltip-icons-for-products/includes/wp-tooltip-icons-products-functions.php+9
    Use of undefined constant enable_icons - assumed 'enable_icons' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dewp-tip-admin-settings
    • > Warning in wp-content/plugins/tooltip-icons-for-products/includes/wp-tooltip-icons-products-admin.php+121
    Use of undefined constant enable_icons - assumed 'enable_icons' (this will throw an Error in a future version of PHP)
  • 25 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dewp-tip-admin-settings
    • > Notice in wp-content/plugins/tooltip-icons-for-products/includes/wp-tooltip-icons-products-admin.php+194
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tooltip-icons-for-products/wp-tooltip-icons-products.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tooltip-icons-for-products/includes/wp-tooltip-icons-products-admin.php:11
    • > PHP Warning
      Use of undefined constant enable_icons - assumed 'enable_icons' (this will throw an Error in a future version of PHP) in wp-content/plugins/tooltip-icons-for-products/includes/wp-tooltip-icons-products-functions.php on line 9
    • > PHP Notice
      Undefined variable: dewp_options in wp-content/plugins/tooltip-icons-for-products/includes/wp-tooltip-icons-products-functions.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/tooltip-icons-for-products/includes/wp-tooltip-icons-products-functions.php on line 9

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

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Requires php: The plugin version is formatted incorrectly
You can look at the official readme.txt

tooltip-icons-for-products/wp-tooltip-icons-products.php 85% from 13 tests

"Tooltip Icons for Products" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 227 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tooltip-icons-for-products.php" instead of "wp-tooltip-icons-products.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected262 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP44635242
CSS22218
JavaScript1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected