78% my-wp-glossary

Code Review | My WP Glossary

WordPress plugin My WP Glossary scored78%from 54 tests.

About plugin

  • Plugin page: my-wp-glossary
  • Plugin version: 0.6.3c...
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 21, 2020
  • Latest release: Jan 15, 2023
  • Number of updates: 35
  • Update frequency: every 21.7 days
  • Top authors: audrasjb (74.29%)bmartinent (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,505 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.44MB] [CPU: ▼3.33ms] Passed 4 tests

A check of server-side resources used by My WP Glossary
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3938.12 ▼2.77
Dashboard /wp-admin3.78 ▲0.4746.89 ▲0.61
Posts /wp-admin/edit.php3.83 ▲0.4751.70 ▲4.29
Add New Post /wp-admin/post-new.php6.37 ▲0.4886.72 ▼15.45
Media Library /wp-admin/upload.php3.64 ▲0.4138.44 ▲5.42
All definitions /wp-admin/edit.php?post_type=mywpglossary3.7541.37
Add new /wp-admin/post-new.php?post_type=mywpglossary3.5635.98

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for My WP Glossary
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.22 ▼1.181.70 ▼0.1643.25 ▼2.56
Dashboard /wp-admin2,230 ▲455.76 ▲0.84100.30 ▼14.7539.85 ▼2.68
Posts /wp-admin/edit.php2,116 ▲272.00 ▼0.0635.87 ▼4.5833.84 ▼6.89
Add New Post /wp-admin/post-new.php6,373 ▲4,85427.67 ▲4.27978.37 ▲303.0955.48 ▲0.22
Media Library /wp-admin/upload.php1,412 ▲244.22 ▼0.0097.87 ▼2.7942.79 ▼0.18
All definitions /wp-admin/edit.php?post_type=mywpglossary1,1151.9734.1831.57
Add new /wp-admin/post-new.php?post_type=mywpglossary1,62316.64856.6332.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=mywpglossary
    • > Notice in wp-content/plugins/my-wp-glossary/my-wp-glossary.php+432
    Trying to get property 'ID' of non-object

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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/my-wp-glossary/my-wp-glossary.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Glossary definition items.), #2 (Glossary Gutenberg block in the editor.), #3 (Glossary page on Twenty Twenty-One bundled theme.), #4 (Glossary page on Twenty Twenty bundled theme.), #5 (Definition are linked to your Glossary Page each time they appear on your website’s Posts.)
You can take inspiration from this readme.txt

my-wp-glossary/my-wp-glossary.php 85% from 13 tests

The principal PHP file in "My WP Glossary" v. 0.6.3c... is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("5.6" instead of "7.0")
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "0.6.3c...")

Code Analysis Passed 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
There were no executable files found in this plugin2,503 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP34234132,402
JavaScript5938100
CSS2121

PHP code Passed 2 tests

An overview 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.52
Average class complexity193.50
▷ Minimum class complexity138.00
▷ Maximum class complexity249.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods90
▷ Static methods11.11%
▷ Public methods7583.33%
▷ Protected methods1516.67%
▷ Private methods00.00%
Functions39
▷ Named functions3282.05%
▷ Anonymous functions717.95%
Constants24
▷ Global constants24100.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
PNG images were not found in this plugin