73% dictionary

Code Review | Dictionary

WordPress plugin Dictionary scored 73% from 54 tests.

About plugin

  • Plugin page: dictionary
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.5.2
  • WordPress version: 5.8.1
  • First release: Jun 25, 2013
  • Latest release: Jun 25, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ajayver (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,602 total downloads


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: ▼142.95ms] Passed 4 tests

This is a short check of server-side resources used by Dictionary
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1232.19 ▲8.00
Dashboard /wp-admin3.07 ▲0.0245.42 ▼1.49
Posts /wp-admin/edit.php3.12 ▲0.0145.77 ▲0.55
Add New Post /wp-admin/post-new.php5.43 ▲0.0088.72 ▼567.46
Media Library /wp-admin/upload.php3.01 ▲0.0035.01 ▼3.39
Dictionary /wp-admin/options-general.php?page=dictionary_plugin2.9827.46

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Dictionary
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8916.30 ▲0.718.32 ▲0.2750.50 ▲3.35
Dashboard /wp-admin2,978 ▲415.93 ▼0.21142.85 ▼5.81121.39 ▲8.36
Posts /wp-admin/edit.php2,744 ▲52.82 ▲0.0065.06 ▲0.8588.40 ▼0.76
Add New Post /wp-admin/post-new.php3,690 ▲121.03 ▲5.98445.61 ▲23.94111.50 ▼4.50
Media Library /wp-admin/upload.php1,815 ▲55.01 ▼0.01158.94 ▲2.01116.76 ▼11.47
Dictionary /wp-admin/options-general.php?page=dictionary_plugin1,0902.4757.9777.16

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
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_dictionary_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dictionary/add-word.php
    • > /wp-content/plugins/dictionary/search-word.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined index: words_to_show in wp-content/plugins/dictionary/show-random.php on line 5
    • > PHP Notice
      Undefined index: word in wp-content/plugins/dictionary/add-word.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dictionary/widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dictionary/dictionary.php:13
    • > PHP Notice
      Undefined index: term in wp-content/plugins/dictionary/search-word.php on line 4
    • > PHP Notice
      Undefined index: definition in wp-content/plugins/dictionary/add-word.php on line 4
    • > PHP Notice
      Undefined index: word_override in wp-content/plugins/dictionary/show-random.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dictionary/admin.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=dictionary_plugin
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=dictionary_plugin:183:24)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=dictionary_plugin
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught TypeError: jQuery(...).live is not a function


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (This is how the widget looks in twentyten, with no styling.), #2 (Widget options), #3 (Settings page)
You can look at the official readme.txt

dictionary/dictionary.php Passed 13 tests

Analyzing the main PHP file in "Dictionary" version 1.0
89 characters long description:
This plugin adds a widget to display a random word and it's definition from the json file

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
Success! There were no dangerous files found in this plugin289 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions685.71%
▷ Anonymous functions114.29%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png8.62KB4.87KB▼ 43.53%
screenshot-3.png10.20KB5.48KB▼ 46.31%
screenshot-1.png6.32KB3.98KB▼ 36.99%