67% glossary-by-codeat

Code Review | Glossary

WordPress plugin Glossary scored67%from 54 tests.

About plugin

  • Plugin page: glossary-by-codeat
  • Plugin version: 2.2.10
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2016
  • Latest release: Nov 21, 2023
  • Number of updates: 237
  • Update frequency: every 11.9 days
  • Top authors: Mte90 (100%)

Code review

54 tests

User reviews

73 reviews

Install metrics

2,000+ active /164,786 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲6.74MB] [CPU: ▲42.78ms] 25% from 4 tests

A check of server-side resources used by Glossary
Please have a look at the following items
  • RAM: You should keep total memory usage under 10MB (currently 10.12MB on /wp-admin/edit.php?post_type=glossary&page=glossary)
  • CPU: Total CPU usage must kept under 500.00ms (currently 2,024.97ms on /wp-admin/edit.php?post_type=glossary&page=glossary)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 6.74MB on /wp-admin/edit.php?post_type=glossary&page=glossary)
PageMemory (MB)CPU Time (ms)
Home /10.10 ▲6.6376.76 ▲38.64
Dashboard /wp-admin10.12 ▲6.8195.83 ▲42.90
Posts /wp-admin/edit.php10.12 ▲6.7693.05 ▲42.04
Add New Post /wp-admin/post-new.php12.64 ▲6.75132.95 ▲47.52
Media Library /wp-admin/upload.php10.12 ▲6.8886.35 ▲54.81
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius10.1278.06
Settings /wp-admin/edit.php?post_type=glossary&page=glossary10.122,024.97

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 1,011 new files
Database: no new tables, 16 new options
New WordPress options
widget_glossary-latest-terms
theysaidso_admin_options
glossary_count_terms
can_compress_scripts
widget_glossary-alphabetical-index
fs_active_plugins
widget_recent-posts
widget_theysaidso_widget
glossary_count_related_terms
db_upgraded
...

Browser metrics Passed 4 tests

Glossary: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲12713.16 ▼1.244.44 ▲2.8531.48 ▼7.86
Dashboard /wp-admin2,288 ▲1104.86 ▼0.82100.62 ▼13.9141.60 ▲0.43
Posts /wp-admin/edit.php2,184 ▲842.47 ▲0.4637.70 ▼2.2834.15 ▼3.98
Add New Post /wp-admin/post-new.php6,292 ▲4,76425.31 ▲2.06940.20 ▲312.4039.68 ▼11.05
Media Library /wp-admin/upload.php1,485 ▲914.42 ▲0.2899.00 ▲1.6044.59 ▲3.18
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1411.9935.3431.02
Settings /wp-admin/edit.php?post_type=glossary&page=glossary1,0592.2340.5461.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/glossary-by-codeat/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 16 options in the database
    • fs_debug_mode
    • widget_recent-posts
    • fs_active_plugins
    • wrm_7f0e94d3baf140f6d309
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • glossary-version
    • widget_glossary-alphabetical-index
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/glossary-by-codeat/vendor/micropackage/requirements/tests/bootstrap.php
    • > /wp-content/plugins/glossary-by-codeat/glossary.php
    • > /wp-content/plugins/glossary-by-codeat/vendor/wpdesk/wp-notice/vendor/wpdesk/wp-builder/tests/integration/bootstrap.php
    • > /wp-content/plugins/glossary-by-codeat/vendor/wpdesk/wp-notice/tests/integration/bootstrap.php
    • > /wp-content/plugins/glossary-by-codeat/vendor/wpdesk/wp-builder/tests/integration/bootstrap.php
  • 347× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/glossary-by-codeat/vendor/ayecode/wp-super-duper/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/glossary-by-codeat/vendor/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/glossary-by-codeat/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/glossary-by-codeat/vendor/micropackage/requirements/tests/Checker/test-ssl.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Counter_Base' not found in wp-content/plugins/glossary-by-codeat/vendor/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/glossary-by-codeat/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/glossary-by-codeat/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Glossary\\Engine\\Base' not found in wp-content/plugins/glossary-by-codeat/frontend/Theme/Archive.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/glossary-by-codeat/vendor/ayecode/wp-super-duper/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/glossary-by-codeat/vendor/micropackage/requirements/tests/Checker/test-plugins.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: tooltip, glossary, lexicon, dictionary, vocabulary

glossary-by-codeat/glossary.php 85% from 13 tests

The main PHP file in "Glossary" ver. 2.2.10 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("glossary-by-codeat.php" instead of "glossary.php")
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin120,791 lines of code in 788 files:
LanguageFilesBlank linesComment linesLines of code
PHP50015,06933,31760,597
PO File12214,32718,51632,401
JSON30009,807
CSS354041,2175,853
SVG40124,651
Markdown341,13703,126
JavaScript224556762,149
Sass17306291,411
YAML127431440
XML114638236
Bourne Shell12111120

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity17.22
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces32
Interfaces26
Traits6
Classes487
▷ Abstract classes224.52%
▷ Concrete classes46595.48%
▷ Final classes20.43%
Methods3,329
▷ Static methods51015.32%
▷ Public methods2,63279.06%
▷ Protected methods2166.49%
▷ Private methods48114.45%
Functions237
▷ Named functions19381.43%
▷ Anonymous functions4418.57%
Constants227
▷ Global constants12655.51%
▷ Class constants10144.49%
▷ Public constants101100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
vendor/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
vendor/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%