72% enhanced-tooltipglossary

Code Review | CM Tooltip Glossary

WordPress plugin CM Tooltip Glossary scored72%from 54 tests.

About plugin

  • Plugin page: enhanced-tooltipg...
  • Plugin version: 4.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 4, 2012
  • Latest release: Jul 23, 2023
  • Number of updates: 605
  • Update frequency: every 6.8 days
  • Top authors: CreativeMindsSolutions (100%)

Code review

54 tests

User reviews

147 reviews

Install metrics

8,000+ active /459,264 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲2.07MB] [CPU: ▲10.83ms] 75% from 4 tests

Server-side resources used by CM Tooltip Glossary
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,007.79ms on /wp-admin/admin.php?page=cmtt_settings)
PageMemory (MB)CPU Time (ms)
Home /5.55 ▲2.0886.37 ▲43.81
Dashboard /wp-admin5.39 ▲2.0865.40 ▲8.65
Posts /wp-admin/edit.php5.44 ▲2.0861.03 ▲10.37
Add New Post /wp-admin/post-new.php8.02 ▲2.13109.39 ▲12.24
Media Library /wp-admin/upload.php5.25 ▲2.0251.13 ▲12.07
User Guide /wp-admin/admin.php?page=cmtt_about5.36458.47
Glossary /wp-admin/edit.php?post_type=glossary5.3061.40
Add New /wp-admin/post-new.php?post_type=glossary8.02101.56
Upgrade ➤ /wp-admin/admin.php?page=cmtt_pro5.3651.12
Settings /wp-admin/admin.php?page=cmtt_settings5.691,007.79

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 130 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
cmtt_glossaryID
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

CM Tooltip Glossary: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10314.75 ▲0.561.97 ▲0.3044.63 ▲1.73
Dashboard /wp-admin2,225 ▲515.51 ▼0.0987.26 ▼13.1182.31 ▲36.63
Posts /wp-admin/edit.php2,175 ▲722.66 ▲0.6647.00 ▲8.7534.42 ▲0.92
Add New Post /wp-admin/post-new.php6,524 ▲4,99728.31 ▲5.14900.32 ▲212.1841.44 ▼11.67
Media Library /wp-admin/upload.php1,436 ▲334.12 ▼0.06102.53 ▲0.0167.69 ▲21.15
User Guide /wp-admin/admin.php?page=cmtt_about4,06817.20396.26212.93
Glossary /wp-admin/edit.php?post_type=glossary1,2062.4342.8633.91
Add New /wp-admin/post-new.php?post_type=glossary6,34320.11883.4564.01
Upgrade ➤ /wp-admin/admin.php?page=cmtt_pro3,0822.7766.7288.49
Settings /wp-admin/admin.php?page=cmtt_settings5,2576.83146.35124.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • cmtt_glossaryID
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/enhanced-tooltipglossary/views/backend/admin_about.php
    • > /wp-content/plugins/enhanced-tooltipglossary/views/backend/admin_nav.php
    • > /wp-content/plugins/enhanced-tooltipglossary/views/backend/admin_extensions.php
  • 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CM\\plugin_dir_path() in wp-content/plugins/enhanced-tooltipglossary/settings/CMTT_Settings.php:5
    • > PHP Warning
      Use of undefined constant CMTT_URL - assumed 'CMTT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/enhanced-tooltipglossary/views/backend/admin_extensions.php on line 13
    • > PHP Warning
      Use of undefined constant CMTT_NAME - assumed 'CMTT_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/enhanced-tooltipglossary/views/backend/admin_extensions.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/enhanced-tooltipglossary/settings/view.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/enhanced-tooltipglossary/package/views/registration.php:42
    • > PHP Warning
      Use of undefined constant CMTT_NAME - assumed 'CMTT_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/enhanced-tooltipglossary/views/backend/admin_about.php on line 6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/enhanced-tooltipglossary/package/views/userguide_free.php:8
    • > PHP Notice
      Undefined variable: submenus in wp-content/plugins/enhanced-tooltipglossary/views/backend/admin_nav.php on line 5
    • > PHP Warning
      Use of undefined constant CMTT_URL - assumed 'CMTT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/enhanced-tooltipglossary/views/backend/admin_about.php on line 6
    • > PHP Warning
      Use of undefined constant CMTT_MENU_OPTION - assumed 'CMTT_MENU_OPTION' (this will throw an Error in a future version of PHP) in wp-content/plugins/enhanced-tooltipglossary/views/backend/admin_template.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=cmtt_about
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=cmtt_about
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
    • > GET request to /wp-admin/admin.php?page=cmtt_about
    • > Deprecation (warning) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/yT/r/JeAVSvamNTp.js?_nc_x=Ij3Wp8lg5Kz 275 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=cmtt_about
    • > Console-api (severe) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/yT/r/JeAVSvamNTp.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."

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: glossary, dictionary, lexicon, tooltip, knowledgebase

enhanced-tooltipglossary/enhanced-tooltipglossary.php 85% from 13 tests

The main PHP script in "CM Tooltip Glossary" version 4.2.8 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 243 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin22,981 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP221,9451,94512,202
JavaScript151,5446317,725
CSS20246733,021
XML10033

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity131.89
▷ Minimum class complexity1.00
▷ Maximum class complexity494.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods313
▷ Static methods24076.68%
▷ Public methods28390.42%
▷ Protected methods309.58%
▷ Private methods00.00%
Functions19
▷ Named functions1263.16%
▷ Anonymous functions736.84%
Constants21
▷ Global constants1676.19%
▷ Class constants523.81%
▷ Public constants5100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
54 PNG files occupy 0.57MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
package/views/popup.png24.92KB7.12KB▼ 71.43%
assets/css/images/icon.png0.40KB0.39KB▼ 2.70%
assets/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
assets/css/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
assets/css/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%