84% sweet-glossary

Code Review | Sweet Glossary

WordPress plugin Sweet Glossary scored84%from 54 tests.

About plugin

  • Plugin page: sweet-glossary
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.3
  • WordPress version: 6.3.1
  • First release: Jan 21, 2022
  • Latest release: Jan 21, 2022
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: rguillermo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /413 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.11MB] [CPU: ▼0.98ms] Passed 4 tests

A check of server-side resources used by Sweet Glossary
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1041.36 ▼3.84
Dashboard /wp-admin3.40 ▲0.0949.28 ▲0.96
Posts /wp-admin/edit.php3.52 ▲0.1649.90 ▼0.86
Add New Post /wp-admin/post-new.php6.10 ▲0.2188.52 ▼0.17
Media Library /wp-admin/upload.php3.32 ▲0.0937.62 ▲1.67
Glossary /wp-admin/edit.php?post_type=glossary3.3739.86

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Sweet Glossary
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲15113.55 ▼0.675.09 ▲3.1939.68 ▼5.73
Dashboard /wp-admin2,220 ▲294.87 ▼0.03102.25 ▼5.7140.00 ▼4.30
Posts /wp-admin/edit.php2,100 ▲82.02 ▲0.0137.42 ▼3.6929.91 ▼8.20
Add New Post /wp-admin/post-new.php1,528 ▼523.41 ▲0.21646.19 ▼43.4562.85 ▲9.22
Media Library /wp-admin/upload.php1,399 ▲114.20 ▲0.09110.27 ▲4.7547.07 ▲1.60
Glossary /wp-admin/edit.php?post_type=glossary1,1061.9430.2130.52

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sweet-glossary/admin/partials/sweet-glossary-admin-display.php
    • > /wp-content/plugins/sweet-glossary/public/partials/sweet-glossary-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

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

The main PHP file in "Sweet Glossary" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
53 characters long description:
A simple, beautiful and SEO friendly glossary plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin433 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12143568318
CSS214492
JavaScript242723

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.29
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.18
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.51MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/banner-772x250.png32.05KB12.81KB▼ 60.04%
.wordpress-org/icon-128x128.png14.26KB5.20KB▼ 63.53%
.wordpress-org/anner-1544x500.png76.75KB31.27KB▼ 59.26%
.wordpress-org/screenshot-1.png310.00KB85.53KB▼ 72.41%
.wordpress-org/screenshot-2.png44.55KB16.78KB▼ 62.34%