78% encyclopedia-lexicon-glossary-wiki-dictionary

Code Review | Encyclopedia / Glossary / Wiki

WordPress plugin Encyclopedia / Glossary / Wiki scored78%from 54 tests.

About plugin

  • Plugin page: encyclopedia-lexi...
  • Plugin version: 1.7.57
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Oct 1, 2012
  • Latest release: Nov 22, 2023
  • Number of updates: 302
  • Update frequency: every 13.5 days
  • Top authors: dhoppe (83.77%)guerilla-code-marketing (16.56%)

Code review

54 tests

User reviews

156 reviews

Install metrics

2,000+ active /197,476 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
Installer ran successfully

Server metrics [RAM: ▲0.78MB] [CPU: ▲2.13ms] Passed 4 tests

Server-side resources used by Encyclopedia / Glossary / Wiki
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.8044.21 ▲3.44
Dashboard /wp-admin4.09 ▲0.7458.12 ▼4.61
Posts /wp-admin/edit.php4.15 ▲0.7950.96 ▲4.24
Add New Post /wp-admin/post-new.php6.77 ▲0.8898.48 ▲12.18
Media Library /wp-admin/upload.php4.01 ▲0.7840.24 ▲5.44
Add Entry /wp-admin/post-new.php?post_type=encyclopedia4.1455.31
Encyclopedia /wp-admin/options-general.php?page=encyclopedia-options4.0644.25
All Entries /wp-admin/edit.php?post_type=encyclopedia4.0644.28
Tags /wp-admin/edit-tags.php?taxonomy=encyclopedia-tag&post_type=encyclopedia4.0038.92

Server storage [IO: ▲0.45MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 88 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
widget_encyclopedia_taxonomy_cloud
widget_encyclopedia_items
widget_encyclopedia_taxonomies
widget_recent-posts
widget_recent-comments
widget_encyclopdia_related_items
theysaidso_admin_options
widget_encyclopedia_search
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Encyclopedia / Glossary / Wiki
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲17513.37 ▼0.969.00 ▲7.4538.09 ▼6.63
Dashboard /wp-admin2,237 ▲625.58 ▼0.0987.56 ▼15.3541.24 ▼0.44
Posts /wp-admin/edit.php2,142 ▲422.07 ▲0.1338.31 ▼0.6633.77 ▼2.01
Add New Post /wp-admin/post-new.php1,558 ▲2923.24 ▲0.27638.55 ▼26.9257.42 ▲0.57
Media Library /wp-admin/upload.php1,439 ▲394.27 ▲0.0495.99 ▼2.1240.20 ▼1.04
Add Entry /wp-admin/post-new.php?post_type=encyclopedia2,3377.60188.7368.04
Encyclopedia /wp-admin/options-general.php?page=encyclopedia-options2,4551.7027.7452.17
All Entries /wp-admin/edit.php?post_type=encyclopedia1,1522.0530.8128.74
Tags /wp-admin/edit-tags.php?taxonomy=encyclopedia-tag&post_type=encyclopedia1,2852.1228.9033.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • widget_encyclopedia_taxonomy_cloud
    • widget_encyclopedia_taxonomies
    • widget_encyclopedia_items
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_encyclopdia_related_items
    • db_upgraded
    • widget_recent-posts
    • widget_encyclopedia_search
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/encyclopedia-lexicon-glossary-wiki-dictionary/templates/encyclopedia-prefix-filter.php
  • 45× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WordPress\\Plugin\\Encyclopedia\\I18n' not found in wp-content/plugins/encyclopedia-lexicon-glossary-wiki-dictionary/options-page/dropbox.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_Option() in wp-content/plugins/encyclopedia-lexicon-glossary-wiki-dictionary/templates/searchform-encyclopedia.php:8
    • > PHP Notice
      Undefined variable: filter in wp-content/plugins/encyclopedia-lexicon-glossary-wiki-dictionary/templates/encyclopedia-prefix-filter.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WordPress\\Plugin\\Encyclopedia\\add_Filter() in wp-content/plugins/encyclopedia-lexicon-glossary-wiki-dictionary/includes/wp-query-extensions.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/encyclopedia-lexicon-glossary-wiki-dictionary/widgets/taxonomy-cloud.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WordPress\\Plugin\\Encyclopedia\\I18n' not found in wp-content/plugins/encyclopedia-lexicon-glossary-wiki-dictionary/options-page/archive-page.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/encyclopedia-lexicon-glossary-wiki-dictionary/widgets/related-items.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WordPress\\Plugin\\Encyclopedia\\MockingBird' not found in wp-content/plugins/encyclopedia-lexicon-glossary-wiki-dictionary/options-page/pro-version.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WordPress\\Plugin\\Encyclopedia\\Options' not found in wp-content/plugins/encyclopedia-lexicon-glossary-wiki-dictionary/options-page/options-page.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WordPress\\Plugin\\Encyclopedia\\I18n' not found in wp-content/plugins/encyclopedia-lexicon-glossary-wiki-dictionary/options-page/post-type-labels.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
9 plugin tags: encyclopedia, vocabulary, glossary, knowledge base, lexicon...

encyclopedia-lexicon-glossary-wiki-dictionary/plugin.php 85% from 13 tests

The entry point to "Encyclopedia / Glossary / Wiki" version 1.7.57 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("encyclopedia-lexicon-glossary-wiki-dictionary.php" instead of "plugin.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin5,825 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PHP496491922,911
PO File49101,1692,426
CSS159246476
JavaScript24112

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity10.61
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes28
▷ Abstract classes2278.57%
▷ Concrete classes621.43%
▷ Final classes00.00%
Methods152
▷ Static methods11676.32%
▷ Public methods14192.76%
▷ Protected methods00.00%
▷ Private methods117.24%
Functions9
▷ Named functions555.56%
▷ Anonymous functions444.44%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/plugin-logo-1544x500.png24.47KB24.87KB0.00%