84% wp-glossary-hover

Code Review | WP Glossary Hover

WordPress plugin WP Glossary Hover scored84%from 54 tests.

About plugin

  • Plugin page: wp-glossary-hover
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 5, 2014
  • Latest release: Aug 4, 2018
  • Number of updates: 16
  • Update frequency: every 94.9 days
  • Top authors: chorton2227 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /3,702 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.08MB] [CPU: ▼2.16ms] Passed 4 tests

This is a short check of server-side resources used by WP Glossary Hover
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0645.18 ▲1.73
Dashboard /wp-admin3.38 ▲0.0850.01 ▼3.22
Posts /wp-admin/edit.php3.49 ▲0.1446.77 ▲1.33
Add New Post /wp-admin/post-new.php5.98 ▲0.0988.36 ▼7.29
Media Library /wp-admin/upload.php3.30 ▲0.0735.37 ▲0.54
All Glossary Terms /wp-admin/edit.php?post_type=wpgh-glossary3.3532.40
WP Glossary Hover /wp-admin/options-general.php?page=wp-glossary-hover3.2726.84
Add New /wp-admin/post-new.php?post_type=wpgh-glossary3.5149.10

Server storage [IO: ▲1.66MB] [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: 465 new files
Database: no new tables, 7 new options
New WordPress options
wp-glossary-hover
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Glossary Hover
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲20914.11 ▼0.4211.94 ▲10.3242.69 ▼0.40
Dashboard /wp-admin2,245 ▲655.75 ▲0.1484.46 ▼14.8639.30 ▼1.47
Posts /wp-admin/edit.php2,149 ▲492.31 ▲0.3235.68 ▼0.7033.31 ▼3.24
Add New Post /wp-admin/post-new.php1,575 ▲4618.86 ▼4.18654.30 ▼16.1545.93 ▼4.95
Media Library /wp-admin/upload.php1,453 ▲534.39 ▲0.18104.66 ▲1.3546.92 ▲3.12
All Glossary Terms /wp-admin/edit.php?post_type=wpgh-glossary1,1612.2433.4629.54
WP Glossary Hover /wp-admin/options-general.php?page=wp-glossary-hover1,1192.1025.3625.28
Add New /wp-admin/post-new.php?post_type=wpgh-glossary2,4767.82165.2562.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WPGH_Base_Field' not found in wp-content/plugins/wp-glossary-hover/includes/fields/class-multi-checkbox-field.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WPGH_Base_Field' not found in wp-content/plugins/wp-glossary-hover/includes/fields/class-checkbox-field.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WPGH_Base_Field' not found in wp-content/plugins/wp-glossary-hover/includes/fields/class-color-picker-field.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WPGH_Base_Field' not found in wp-content/plugins/wp-glossary-hover/includes/fields/class-select-field.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WPGH_Base_Field' not found in wp-content/plugins/wp-glossary-hover/includes/fields/class-textbox-field.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WPGH_Base_Field' not found in wp-content/plugins/wp-glossary-hover/includes/fields/class-integer-field.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WPGH_Base_Enum' not found in wp-content/plugins/wp-glossary-hover/includes/enums/class-field-types-enum.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: definition, glossary, hover

wp-glossary-hover/wp-glossary-hover.php Passed 13 tests

The entry point to "WP Glossary Hover" version 1.3.1 is a PHP file that has certain tags in its header comment area
69 characters long description:
When hovering over a word or phrase show the user created definition.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin10,316 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
CSS262656538,933
PHP195111,2081,220
PO File15468134
JavaScript24029

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.56
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes212.50%
▷ Concrete classes1487.50%
▷ Final classes00.00%
Methods71
▷ Static methods1419.72%
▷ Public methods5070.42%
▷ Protected methods11.41%
▷ Private methods2028.17%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
345 PNG files occupy 1.12MB with 0.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/jquery-ui/css/themes/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png0.33KB0.18KB▼ 44.41%
vendor/jquery-ui/css/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
vendor/jquery-ui/css/themes/black-tie/images/ui-bg_flat_65_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
vendor/jquery-ui/css/themes/vader/images/ui-bg_highlight-soft_35_adadad_1x100.png0.27KB0.16KB▼ 41.07%
vendor/jquery-ui/css/themes/dot-luv/images/ui-bg_dots-small_40_00498f_2x2.png0.22KB0.08KB▼ 61.16%