84% automatic-tooltips

Code Review | Automatic Tooltips

WordPress plugin Automatic Tooltips scored84%from 54 tests.

About plugin

  • Plugin page: automatic-tooltips
  • Plugin version: 1.07
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 9, 2022
  • Latest release: Mar 9, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: daext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,229 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.60MB] [CPU: ▼3.50ms] Passed 4 tests

This is a short check of server-side resources used by Automatic Tooltips
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1741.99 ▼3.18
Dashboard /wp-admin4.10 ▲0.7551.33 ▼11.20
Posts /wp-admin/edit.php4.15 ▲0.7955.78 ▲3.25
Add New Post /wp-admin/post-new.php6.64 ▲0.74101.53 ▼2.88
Media Library /wp-admin/upload.php3.96 ▲0.7344.43 ▲6.63
Statistics /wp-admin/admin.php?page=daextauttol-statistics3.9948.65
Help /wp-admin/admin.php?page=daextauttol-help3.9337.45
Categories /wp-admin/admin.php?page=daextauttol-categories4.0440.77
Tooltips /wp-admin/admin.php?page=daextauttol-tooltips4.3144.65
Options /wp-admin/admin.php?page=daextauttol-options3.9540.93

Server storage [IO: ▲0.53MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 58 new files
Database: 3 new tables, 55 new options
New tables
wp_daextauttol_category
wp_daextauttol_tooltip
wp_daextauttol_statistic
New WordPress options
daextauttol_style_tooltip_font_family
daextauttol_advanced_general_limit_characters_per_tooltip
daextauttol_style_tooltip_max_width
daextauttol_advanced_protected_tags
widget_recent-comments
db_upgraded
daextauttol_style_tooltip_horizontal_padding
daextauttol_style_tooltip_font_size
daextauttol_defaults_right_boundary
daextauttol_database_version
...

Browser metrics Passed 4 tests

An overview of browser requirements for Automatic Tooltips
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8214.34 ▼0.321.66 ▼0.4242.69 ▲1.91
Dashboard /wp-admin2,237 ▲575.64 ▼0.0591.06 ▼5.9539.12 ▼0.95
Posts /wp-admin/edit.php2,142 ▲392.01 ▲0.0139.62 ▲3.5937.26 ▲3.27
Add New Post /wp-admin/post-new.php1,576 ▲3618.85 ▼4.19612.83 ▼112.4452.56 ▼9.98
Media Library /wp-admin/upload.php1,442 ▲424.21 ▼0.0597.35 ▼13.2743.70 ▼1.09
Statistics /wp-admin/admin.php?page=daextauttol-statistics9181.9125.6235.95
Help /wp-admin/admin.php?page=daextauttol-help8402.0525.2427.81
Categories /wp-admin/admin.php?page=daextauttol-categories9822.2452.2734.14
Tooltips /wp-admin/admin.php?page=daextauttol-tooltips1,4782.8768.3538.83
Options /wp-admin/admin.php?page=daextauttol-options1,7842.8469.8936.61

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/automatic-tooltips/admin/view/help.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/automatic-tooltips/admin/view/tooltips.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/automatic-tooltips/admin/view/statistics.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/automatic-tooltips/admin/view/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/automatic-tooltips/admin/view/categories.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

automatic-tooltips/init.php 92% from 13 tests

"Automatic Tooltips" version 1.07's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("automatic-tooltips.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected8,429 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP141,4068944,362
CSS15516902,670
JavaScript11188601,378
Markdown14019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity45.33
▷ Minimum class complexity6.00
▷ Maximum class complexity142.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity84.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods138
▷ Static methods75.07%
▷ Public methods12489.86%
▷ Protected methods00.00%
▷ Private methods1410.14%
Functions8
▷ Named functions112.50%
▷ Anonymous functions787.50%
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
14 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/inc/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
admin/assets/img/search-hover.png0.21KB0.21KB0.00%
admin/assets/img/clone-hover.png18.71KB0.12KB▼ 99.34%
admin/assets/img/arrow-down-f7f7f7.png15.21KB0.15KB▼ 98.99%
admin/assets/img/edit-hover.png1.30KB0.33KB▼ 74.47%