83% wordpress-tooltips

Code Review | Wordpress Tooltips

WordPress plugin Wordpress Tooltips scored83%from 54 tests.

About plugin

  • Plugin page: wordpress-tooltips
  • Plugin version: 9.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.4
  • WordPress version: 6.3.1
  • First release: Aug 28, 2011
  • Latest release: Dec 2, 2023
  • Number of updates: 227
  • Update frequency: every 19.7 days
  • Top authors: zhuyi (100%)

Code review

54 tests

User reviews

63 reviews

Install metrics

6,000+ active /421,389 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.66MB] [CPU: ▲12.13ms] 75% from 4 tests

This is a short check of server-side resources used by Wordpress Tooltips
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 2,664.19ms on /wp-admin/edit.php?post_type=tooltips&page=tooltipglobalsettings)
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7373.28 ▲28.88
Dashboard /wp-admin4.00 ▲0.6960.31 ▲7.99
Posts /wp-admin/edit.php4.03 ▲0.6762.82 ▲12.89
Add New Post /wp-admin/post-new.php6.53 ▲0.6498.90 ▲6.34
Media Library /wp-admin/upload.php3.86 ▲0.6354.96 ▲21.30
Categories /wp-admin/edit-tags.php?taxonomy=tooltips_categories&post_type=tooltips3.9851.57
Glossary Settings /wp-admin/edit.php?post_type=tooltips&page=glossarysettingsfree3.9650.61
Import Tooltips /wp-admin/edit.php?post_type=tooltips&page=tooltipsimport3.8345.35
Addons /wp-admin/edit.php?post_type=tooltips&page=tooltipsfreeaddonmanager3.8948.19
Global Settings /wp-admin/edit.php?post_type=tooltips&page=tooltipglobalsettings4.992,664.19
Knowledge Base /wp-admin/edit.php?post_type=tooltips&page=tooltipsfaq3.9948.10
Add New /wp-admin/post-new.php?post_type=tooltips4.1170.57
Directory Settings /wp-admin/edit.php?post_type=tooltips&page=tooltipdirectorysetting3.8349.28
All Tooltips /wp-admin/edit.php?post_type=tooltips3.8852.09

Server storage [IO: ▲1.11MB] [DB: ▲0.05MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 61 new files
Database: no new tables, 10 new options
New WordPress options
user_first_run_guide_bar
seletEnableJqueryMigrate
ztooltipversion
db_upgraded
enableTooltipsForImage
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Wordpress Tooltips
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,023 ▲27613.62 ▼0.6514.05 ▲12.2740.43 ▼4.46
Dashboard /wp-admin2,259 ▲815.76 ▲0.0696.05 ▼4.0342.62 ▲1.88
Posts /wp-admin/edit.php2,164 ▲672.03 ▲0.0837.17 ▼1.1733.38 ▼2.96
Add New Post /wp-admin/post-new.php1,579 ▲5423.24 ▼0.17678.96 ▲80.3653.46 ▲3.23
Media Library /wp-admin/upload.php1,467 ▲644.25 ▲0.0595.18 ▼0.4342.87 ▲0.67
Categories /wp-admin/edit-tags.php?taxonomy=tooltips_categories&post_type=tooltips1,3412.1930.3431.64
Glossary Settings /wp-admin/edit.php?post_type=tooltips&page=glossarysettingsfree1,3281.9627.6935.16
Import Tooltips /wp-admin/edit.php?post_type=tooltips&page=tooltipsimport9411.6923.4633.35
Addons /wp-admin/edit.php?post_type=tooltips&page=tooltipsfreeaddonmanager1,1261.7428.4538.30
Global Settings /wp-admin/edit.php?post_type=tooltips&page=tooltipglobalsettings3,1182.3247.3379.16
Knowledge Base /wp-admin/edit.php?post_type=tooltips&page=tooltipsfaq1,9731.7723.8638.71
Add New /wp-admin/post-new.php?post_type=tooltips2,7657.86183.5471.41
Directory Settings /wp-admin/edit.php?post_type=tooltips&page=tooltipdirectorysetting1,0981.7025.7428.39
All Tooltips /wp-admin/edit.php?post_type=tooltips1,1421.9733.1232.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 10 options in the database
    • can_compress_scripts
    • enableTooltipsForImage
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • ztooltipversion
    • widget_recent-posts
    • theysaidso_admin_options
    • seletEnableJqueryMigrate
    • user_first_run_guide_bar

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/wordpress-tooltips/directory/rules/useroles.php
    • > /wp-content/plugins/wordpress-tooltips/admin/howto.php
    • > /wp-content/plugins/wordpress-tooltips/admin/glossaryglobalsettings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
5 plugin tags: tooltip, knowledge base, glossary, woocommerce, dictionary

wordpress-tooltips/tooltips.php 85% from 13 tests

The entry point to "Wordpress Tooltips" version 9.3.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wordpress-tooltips.php" instead of "tooltips.php")
  • Description: The description should be shorter than 140 characters (currently 326 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
Success! There were no dangerous files found in this plugin14,337 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP191,2629656,437
JavaScript141,4731,1935,913
CSS82941611,891
PO File1272996

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions92
▷ Named functions92100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/new.png5.78KB1.61KB▼ 72.15%