72% mowster-glossary

Code Review | mowsterGlossary

WordPress plugin mowsterGlossary scored 72% from 54 tests.

About plugin

  • Plugin page: mowster-glossary
  • Plugin version: 2.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.1
  • WordPress version: 5.8.1
  • First release: Sep 11, 2010
  • Latest release: Mar 11, 2013
  • Number of updates: 56
  • Update frequency: every 17.5 days
  • Top authors: PedroDM (82.14%)mowster (19.64%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,980 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.84MB] [CPU: ▼176.27ms] Passed 4 tests

An overview of server-side resources used by mowsterGlossary
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2043.73 ▲24.31
Dashboard /wp-admin2.81 ▼0.2422.97 ▼20.18
Posts /wp-admin/edit.php2.81 ▼0.3020.21 ▼26.18
Add New Post /wp-admin/post-new.php2.81 ▼2.6221.45 ▼646.97
Media Library /wp-admin/upload.php2.81 ▼0.1919.68 ▼11.74
Add term /wp-admin/admin.php?page=mowsterGadd2.8122.13
Terms /wp-admin/admin.php?page=mowsterG2.8122.61
mowsterGlossary /wp-admin/options-general.php?page=mowster-glossary/index.php2.8120.88

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: 1 new table, 11 new options
New tables
wp_mowster-glossary
New WordPress options
mowsterG_pagination_word
mowsterG_html_before_term
mowsterG_html_before_description
mowsterG_shortcode
mowsterG_html_after_term
mowsterG_text_previous_page
mowsterG_html_after_description
mowsterG_mid_size
mowsterG_text_next_page
mowsterG_terms_per_page
...

Browser metrics Passed 4 tests

Checking browser requirements for mowsterGlossary
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,736 ▲14016.28 ▲0.439.62 ▲1.7448.36 ▼0.63
Dashboard /wp-admin2,999 ▲685.90 ▼0.06134.00 ▼19.37131.96 ▲19.02
Posts /wp-admin/edit.php2,787 ▲482.68 ▼0.0264.39 ▼4.0789.34 ▼7.09
Add New Post /wp-admin/post-new.php1,526 ▲2818.56 ▼0.34368.36 ▼8.87106.77 ▼3.81
Media Library /wp-admin/upload.php1,784 ▼235.01 ▼0.01126.61 ▼30.60142.40 ▲26.46
Add term /wp-admin/admin.php?page=mowsterGadd1,4933.5880.01101.23
Terms /wp-admin/admin.php?page=mowsterG1,1382.3455.5665.59
mowsterGlossary /wp-admin/options-general.php?page=mowster-glossary/index.php1,6702.3458.18102.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 26 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mowster-glossary/index.php
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mowster-glossary/index.php
    • > User deprecated in wp-includes/functions.php+5211
    add_utility_page is deprecated since version 4.5.0! Use add_menu_page() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mowster-glossary/index.php
    • > Notice in wp-content/plugins/mowster-glossary/options.php+37
    Undefined index: submit
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mowster-glossary/index.php
    • > User notice in wp-includes/functions.php+5663
    wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mowster-glossary/index.php
    • > Notice in wp-includes/wp-db.php+1323
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mowsterG
    • > Notice in wp-content/plugins/mowster-glossary/tools/list_terms.php+33
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=mowsterG
    • > Notice in wp-content/plugins/mowster-glossary/tools/list_terms.php+121
    Undefined variable: number_of_terms
    • > GET request to /wp-admin/options-general.php?page=mowster-glossary/index.php
    • > Notice in wp-content/plugins/mowster-glossary/functions.php+76
    Undefined variable: return

SRP 50% 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
Almost there! Just fix the following items
  • 12× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/mowster-glossary/options.php
    • > /wp-content/plugins/mowster-glossary/tools/preview.php
    • > /wp-content/plugins/mowster-glossary/shortcode.php
    • > /wp-content/plugins/mowster-glossary/tools/delete_term.php
    • > /wp-content/plugins/mowster-glossary/tools/edit_term.php
    • > /wp-content/plugins/mowster-glossary/tools/add_new.php
    • > /wp-content/plugins/mowster-glossary/tools.php
    • > /wp-content/plugins/mowster-glossary/tools/list_terms.php
    • > /wp-content/plugins/mowster-glossary/index.php
    • > /wp-content/plugins/mowster-glossary/users.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=mowsterGadd
    • > Network (severe)
    wp-includes/js/tinymce/themes/advanced/theme.min.js?wp-mce-49110-20201110 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: posts, terms, glossary, definitions, dictionary...

mowster-glossary/index.php 92% from 13 tests

The primary PHP file in "mowsterGlossary" version 2.4.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mowster-glossary.php" instead of "index.php")

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 plugin1,385 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP1221621973
JavaScript4800215
PO File161141148
CSS112049

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.05MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/menu_icon.png49.32KB0.92KB▼ 98.14%