79% wppedia

Code Review | Glossary by WPPedia - Best Glossary plugin for WordPress

WordPress plugin Glossary by WPPedia - Best Glossary plugin for WordPress scored79%from 54 tests.

About plugin

  • Plugin page: wppedia
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 14, 2021
  • Latest release: Jun 7, 2022
  • Number of updates: 22
  • Update frequency: every 19.1 days
  • Top authors: steinrein (86.36%)bastianfiessinger (18.18%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,712 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
Install script ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼2.95ms] Passed 4 tests

Server-side resources used by Glossary by WPPedia - Best Glossary plugin for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2440.82 ▼6.12
Dashboard /wp-admin3.56 ▲0.2647.17 ▲0.15
Posts /wp-admin/edit.php3.62 ▲0.2747.66 ▲4.22
Add New Post /wp-admin/post-new.php6.24 ▲0.3683.46 ▼5.47
Media Library /wp-admin/upload.php3.42 ▲0.2035.49 ▼0.34
Add New /wp-admin/post-new.php?post_type=wppedia_term6.30106.89
All Glossary Terms /wp-admin/edit.php?post_type=wppedia_term3.5438.44
WPPedia Settings /wp-admin/edit.php?post_type=wppedia_term&page=wppedia_settings3.4031.55
Categories /wp-admin/edit-tags.php?taxonomy=wppedia_category&post_type=wppedia_term3.4235.26

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 164 new files
Database: no new tables, 7 new options
New WordPress options
wppedia_notifications
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Glossary by WPPedia - Best Glossary plugin for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲7013.21 ▼1.381.74 ▼0.2939.56 ▼2.76
Dashboard /wp-admin2,247 ▲565.84 ▲0.91102.78 ▲4.2539.92 ▼2.26
Posts /wp-admin/edit.php2,127 ▲412.01 ▼0.0138.54 ▲3.7435.67 ▲3.75
Add New Post /wp-admin/post-new.php1,565 ▲3723.12 ▲4.76611.79 ▼31.0649.04 ▼12.96
Media Library /wp-admin/upload.php1,429 ▲384.24 ▲0.0497.03 ▼1.5740.85 ▼0.70
Add New /wp-admin/post-new.php?post_type=wppedia_term6,24019.52846.1535.25
All Glossary Terms /wp-admin/edit.php?post_type=wppedia_term1,1081.9635.1929.38
WPPedia Settings /wp-admin/edit.php?post_type=wppedia_term&page=wppedia_settings1,3072.5354.3731.66
Categories /wp-admin/edit-tags.php?taxonomy=wppedia_category&post_type=wppedia_term1,3032.1425.6627.53

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 7 options in the database
    • widget_recent-comments
    • wppedia_notifications
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wppedia/core/inc/assets.php:85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_permalink() in wp-content/plugins/wppedia/templates/loop/post-title.php:24
    • > PHP Fatal error
      Trait 'WPPedia_Vendor\\MyThemeShop\\Database\\Escape' not found in wp-content/plugins/wppedia/3rd-party/mythemeshop/wordpress-helpers/src/database/class-query-builder.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_permalink() in wp-content/plugins/wppedia/templates/loop/post-featured-image.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Isolated\\Symfony\\Component\\Finder\\Finder' not found in wp-content/plugins/wppedia/config/php-scoper/mythemeshop.inc.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WPPedia_Vendor\\WP_List_Table' not found in wp-content/plugins/wppedia/3rd-party/mythemeshop/wordpress-helpers/src/admin/class-list-table.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wppedia_get_posts_initial_letter_list() in wp-content/plugins/wppedia/templates/nav/char-navigation.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WPPedia_Vendor\\Composer\\Autoload\\ClassLoader' not found in wp-content/plugins/wppedia/3rd-party/mythemeshop/wordpress-helpers/vendor/composer/autoload_real.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WPPedia_Vendor\\Composer\\Autoload\\ClassLoader' not found in wp-content/plugins/wppedia/3rd-party/mythemeshop/wordpress-helpers/vendor/composer/autoload_real.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wppedia/template-hooks/hooks.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=wppedia_term
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot set properties of null (setting 'components')" "TypeError: Cannot set properties of null (setting 'components')\n at registerComponents (/wp-content/plugins/wppedia/dist/js/edit.bundle.js?ver=1.3.0:1:936)\n at /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks,moxiejs,plupload&ver=6.3.1:13:3096\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wppedia/dist/js/edit.bundle.js?ver=1.3.0:1:1120)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=wppedia_term&page=wppedia_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot set properties of null (setting 'components')" "TypeError: Cannot set properties of null (setting 'components')\n at registerComponents (/wp-content/plugins/wppedia/dist/js/options.bundle.js?ver=1.3.0:1:2009)\n at /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:13:3096\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wppedia/dist/js/options.bundle.js?ver=1.3.0:1:2190)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: encyclopedia, clavis, lexicon, tooltip, vocabulary...

wppedia/wppedia.php Passed 13 tests

Analyzing the main PHP file in "Glossary by WPPedia - Best Glossary plugin for WordPress" version 1.3.0
50 characters long description:
The most advanced Glossary solution for WordPress!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected22,599 lines of code in 179 files:
LanguageFilesBlank linesComment linesLines of code
JSON60014,907
PHP1121,3314,5335,961
Sass15464556
JavaScript18133167517
PO File1101103330
Markdown10920257
SVG91150
XML11014
CSS7007

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity14.31
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces13
Interfaces0
Traits10
Classes48
▷ Abstract classes00.00%
▷ Concrete classes48100.00%
▷ Final classes00.00%
Methods442
▷ Static methods11024.89%
▷ Public methods35981.22%
▷ Protected methods224.98%
▷ Private methods6113.80%
Functions76
▷ Named functions6382.89%
▷ Anonymous functions1317.11%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/WPPedia-pro-teaser.png13.76KB6.82KB▼ 50.42%