89% heroic-glossary

Code Review | Heroic Glossary

WordPress plugin Heroic Glossary scored89%from 54 tests.

About plugin

  • Plugin page: heroic-glossary
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Jan 24, 2020
  • Latest release: May 16, 2022
  • Number of updates: 14
  • Update frequency: every 63.3 days
  • Top authors: herothemes (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

4,000+ active /22,815 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.51ms] Passed 4 tests

An overview of server-side resources used by Heroic Glossary
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.21 ▼0.98
Dashboard /wp-admin3.32 ▲0.0251.80 ▲1.58
Posts /wp-admin/edit.php3.37 ▲0.0149.66 ▼2.35
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.89 ▼4.29
Media Library /wp-admin/upload.php3.25 ▲0.0140.56 ▲3.48

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Heroic Glossary
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲11913.42 ▼0.5210.13 ▲8.1645.11 ▲3.92
Dashboard /wp-admin2,189 ▲95.64 ▼0.0392.74 ▲0.1043.26 ▲1.38
Posts /wp-admin/edit.php2,103 ▼02.03 ▲0.0541.13 ▲0.3037.61 ▼0.65
Add New Post /wp-admin/post-new.php6,199 ▲4,67119.27 ▼3.79926.70 ▲295.5060.18 ▲6.12
Media Library /wp-admin/upload.php1,397 ▼34.10 ▼0.04102.47 ▼6.7043.83 ▼1.08

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: synonyms, terms, definition, dictionary, glossary...

heroic-glossary/ht-glossary.php 85% from 13 tests

The entry point to "Heroic Glossary" version 1.2.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("heroic-glossary.php" instead of "ht-glossary.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected228 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript224698
PO File1283166
PHP2151961
CSS2002
JSON1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin