79% luckywp-glossary

Code Review | LuckyWP Glossary

WordPress plugin LuckyWP Glossary scored79%from 54 tests.

About plugin

  • Plugin page: luckywp-glossary
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2018
  • Latest release: Jul 1, 2020
  • Number of updates: 14
  • Update frequency: every 51.8 days
  • Top authors: theluckywp (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /6,442 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.52MB] [CPU: ▼0.04ms] Passed 4 tests

A check of server-side resources used by LuckyWP Glossary
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4742.79 ▲1.04
Dashboard /wp-admin3.84 ▲0.5453.53 ▲7.72
Posts /wp-admin/edit.php3.89 ▲0.5450.10 ▼1.10
Add New Post /wp-admin/post-new.php6.46 ▲0.5789.82 ▼6.01
Media Library /wp-admin/upload.php3.76 ▲0.5444.88 ▲5.91
Settings /wp-admin/edit.php?post_type=lwpgls_term&page=lwpgls_settings3.8037.85
All Terms /wp-admin/edit.php?post_type=lwpgls_term3.8138.25
Add Term /wp-admin/post-new.php?post_type=lwpgls_term3.9257.55

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 61 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
lwpgls_general
db_upgraded
widget_theysaidso_widget
lwpgls_misc

Browser metrics Passed 4 tests

LuckyWP 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,843 ▲8214.73 ▲0.181.69 ▼0.1339.26 ▲2.90
Dashboard /wp-admin2,246 ▲725.63 ▲0.0385.22 ▼7.2137.42 ▼0.35
Posts /wp-admin/edit.php2,134 ▲342.10 ▲0.1036.77 ▼2.4130.27 ▼2.04
Add New Post /wp-admin/post-new.php1,572 ▲4422.94 ▼0.06605.76 ▼14.0069.20 ▲4.00
Media Library /wp-admin/upload.php1,448 ▲484.27 ▲0.08104.36 ▼6.3748.16 ▼0.08
Settings /wp-admin/edit.php?post_type=lwpgls_term&page=lwpgls_settings1,1002.1727.2939.77
All Terms /wp-admin/edit.php?post_type=lwpgls_term1,1161.9732.3032.70
Add Term /wp-admin/post-new.php?post_type=lwpgls_term2,2457.69186.7980.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • lwpgls_misc

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/luckywp-glossary/front/views/archive-term.php
  • 43× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\glossary\\core\\base\\Widget' not found in wp-content/plugins/luckywp-glossary/admin/widgets/termSynonymsMetabox/TermSynonymsMetabox.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\glossary\\core\\base\\BaseObject' not found in wp-content/plugins/luckywp-glossary/front/Route.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\glossary\\core\\front\\BaseFront' not found in wp-content/plugins/luckywp-glossary/front/Front.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\glossary\\core\\base\\BaseObject' not found in wp-content/plugins/luckywp-glossary/core/base/Model.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/luckywp-glossary/admin/views/settings/index.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\glossary\\core\\base\\BasePlugin' not found in wp-content/plugins/luckywp-glossary/plugin/Plugin.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\glossary\\core\\base\\Widget' not found in wp-content/plugins/luckywp-glossary/front/widgets/TermsArchive.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\glossary\\core\\base\\BaseObject' not found in wp-content/plugins/luckywp-glossary/core/base/View.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\glossary\\core\\base\\BaseObject' not found in wp-content/plugins/luckywp-glossary/core/wp/RewriteRules.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/luckywp-glossary/config/settings.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: wiki, synonyms, dictionary, glossary, terms

luckywp-glossary/luckywp-glossary.php Passed 13 tests

This is the main PHP file of "LuckyWP Glossary" version 1.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
85 characters long description:
The plugin implements the glossary/dictionary functionality with support of synonyms.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected3,003 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP535399432,967
JavaScript12323
CSS30013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity10.72
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces19
Interfaces1
Traits0
Classes42
▷ Abstract classes614.29%
▷ Concrete classes3685.71%
▷ Final classes00.00%
Methods197
▷ Static methods4120.81%
▷ Public methods18593.91%
▷ Protected methods105.08%
▷ Private methods21.02%
Functions34
▷ Named functions411.76%
▷ Anonymous functions3088.24%
Constants14
▷ Global constants00.00%
▷ Class constants14100.00%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin