84% terms-dictionary

Code Review | Terms Dictionary

WordPress plugin Terms Dictionary scored 84% from 54 tests.

About plugin

  • Plugin page: terms-dictionary
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 9, 2016
  • Latest release: Apr 10, 2023
  • Number of updates: 16
  • Update frequency: every 152.2 days
  • Top authors: Somonator (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 3,035 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.07MB] [CPU: ▼4.91ms] Passed 4 tests

A check of server-side resources used by Terms Dictionary
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0940.09 ▼4.27
Dashboard /wp-admin3.38 ▲0.0845.60 ▼0.30
Posts /wp-admin/edit.php3.43 ▲0.0744.93 ▲0.03
Add New Post /wp-admin/post-new.php5.96 ▲0.0782.90 ▼12.39
Media Library /wp-admin/upload.php3.30 ▲0.0732.17 ▼2.66
All terms /wp-admin/edit.php?post_type=dict-terms3.3433.62
Tags /wp-admin/edit-tags.php?taxonomy=dict-terms-tag&post_type=dict-terms3.2933.05
Add term /wp-admin/post-new.php?post_type=dict-terms3.4251.68
All letters /wp-admin/edit-tags.php?taxonomy=dict-terms-letter&post_type=dict-terms3.2931.61

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Terms Dictionary
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.24 ▼1.154.80 ▲3.0443.82 ▼7.08
Dashboard /wp-admin2,238 ▲465.90 ▲0.93110.82 ▼2.9440.02 ▲2.90
Posts /wp-admin/edit.php2,121 ▲291.99 ▼0.0534.18 ▼4.0230.87 ▼4.53
Add New Post /wp-admin/post-new.php1,563 ▲4923.37 ▲5.85660.46 ▼20.7850.78 ▼2.16
Media Library /wp-admin/upload.php1,423 ▲354.20 ▲0.0298.54 ▼6.7841.54 ▼3.29
All terms /wp-admin/edit.php?post_type=dict-terms1,0731.9931.8443.22
Tags /wp-admin/edit-tags.php?taxonomy=dict-terms-tag&post_type=dict-terms1,3002.1426.3028.12
Add term /wp-admin/post-new.php?post_type=dict-terms2,2347.64162.3762.14
All letters /wp-admin/edit-tags.php?taxonomy=dict-terms-letter&post_type=dict-terms1,2972.1427.4627.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/terms-dictionary/frontend.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/terms-dictionary/dictionary.php:33

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 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed: You can take inspiration from this readme.txt

terms-dictionary/dictionary.php 92% from 13 tests

The main file in "Terms Dictionary" v. 1.5.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("terms-dictionary.php" instead of "dictionary.php")

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
No dangerous file extensions were detected255 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28123254
CSS1131

PHP code Passed 2 tests

A short 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.35
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected