72% personal-dictionary

Code Review | Personal Dictionary - Vocabulary Games, Memory Games

WordPress plugin Personal Dictionary - Vocabulary Games, Memory Games scored72%from 54 tests.

About plugin

  • Plugin page: personal-dictionary
  • Plugin version: 1.8.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2021
  • Latest release: Nov 28, 2023
  • Number of updates: 192
  • Update frequency: every 5.1 days
  • Top authors: ays-pro (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /7,396 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.84MB] [CPU: ▼6.09ms] Passed 4 tests

A check of server-side resources used by Personal Dictionary - Vocabulary Games, Memory Games
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.8543.59 ▲3.54
Dashboard /wp-admin4.17 ▲0.8352.98 ▼12.05
Posts /wp-admin/edit.php4.21 ▲0.8553.71 ▲4.31
Add New Post /wp-admin/post-new.php6.82 ▲0.9384.39 ▼20.16
Media Library /wp-admin/upload.php4.05 ▲0.8241.87 ▲9.48
Reports /wp-admin/admin.php?page=personal-dictionary-dictionary-reports4.0151.31
Settings /wp-admin/admin.php?page=personal-dictionary-dictionary-settings4.4245.62
Home /wp-admin/admin.php?page=personal-dictionary4.0146.80
Our products /wp-admin/admin.php?page=personal-dictionary-our-products4.0340.18
How to use /wp-admin/admin.php?page=personal-dictionary-how-to-use4.0234.85
PRO features /wp-admin/admin.php?page=personal-dictionary-pro-features4.0656.05
Leaderboard /wp-admin/admin.php?page=personal-dictionary-dictionary-leaderboard4.0038.52

Server storage [IO: ▲3.71MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 132 new files
Database: 5 new tables, 10 new options
New tables
wp_ayspd_settings
wp_ayspd_globsettings
wp_ayspd_words
wp_ayspd_reports
wp_ayspd_categories
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
ays_pd_sale_notification
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
ays_pd_db_version
ays_pd_banner_time
ays_pd_sale_dismiss_for_two_month

Browser metrics Passed 4 tests

Personal Dictionary - Vocabulary Games, Memory Games: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,009 ▲26213.85 ▼0.4913.50 ▲11.7133.74 ▼11.19
Dashboard /wp-admin2,272 ▲915.70 ▼0.0294.79 ▼17.7986.20 ▲46.10
Posts /wp-admin/edit.php2,177 ▲742.01 ▲0.0138.99 ▼7.6636.37 ▼1.02
Add New Post /wp-admin/post-new.php1,589 ▲6123.38 ▲0.29669.98 ▲84.8453.98 ▲4.76
Media Library /wp-admin/upload.php1,465 ▲714.18 ▼0.0895.28 ▼1.7081.99 ▲41.12
Reports /wp-admin/admin.php?page=personal-dictionary-dictionary-reports1,3923.8180.11142.43
Settings /wp-admin/admin.php?page=personal-dictionary-dictionary-settings4,0127.36302.36187.63
Home /wp-admin/admin.php?page=personal-dictionary1,4753.7945.8195.62
Our products /wp-admin/admin.php?page=personal-dictionary-our-products1,5213.7543.4098.73
How to use /wp-admin/admin.php?page=personal-dictionary-how-to-use1,98610.55314.07150.80
PRO features /wp-admin/admin.php?page=personal-dictionary-pro-features1,7353.6547.1097.61
Leaderboard /wp-admin/admin.php?page=personal-dictionary-dictionary-leaderboard1,3793.7946.5480.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-posts
    • theysaidso_admin_options
    • ays_pd_banner_time
    • widget_theysaidso_widget
    • can_compress_scripts
    • ays_pd_sale_notification
    • ays_pd_sale_dismiss_for_two_month
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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/personal-dictionary/public/partials/personal-dictionary-public-display.php
    • > /wp-content/plugins/personal-dictionary/admin/partials/personal-dictionary-admin-display.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/personal-dictionary/admin/partials/features/personal-dictionary-pro-features-display.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/personal-dictionary/admin/partials/leaderboards/personal-dictionary-leaderboards-display.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/personal-dictionary/admin/partials/reports/personal-dictionary-reports-display.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Personal_Dictionary_Dictionaries' not found in wp-content/plugins/personal-dictionary/admin/partials/dictionaries/personal-dictionary-dictionaries-display.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/personal-dictionary/admin/partials/features/personal-dictionary-products-display.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/personal-dictionary/admin/partials/how-to-use/personal-dictionary-how-to-use-display.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Personal_Dictionary_Settings_Actions' not found in wp-content/plugins/personal-dictionary/admin/partials/settings/personal-dictionary-settings-display.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=personal-dictionary-dictionary-leaderboard
    • > Network (severe)
    wp-content/plugins/personal-dictionary/admin/js/personal-dictionary-sweetalert2.all.min?ver=1.8.8 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: elearning, dictionary, memory game, word game, education...

personal-dictionary/personal-dictionary.php Passed 13 tests

The primary PHP file in "Personal Dictionary - Vocabulary Games, Memory Games" version 1.8.8 is used by WordPress to initiate all plugin functionality
80 characters long description:
Allow your students to create personal dictionary, study and memorize the words.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected13,201 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
PHP247578964,656
SVG31022,882
CSS96391,0972,262
JavaScript113551831,999
PO File28341,6161,402

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 121)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity47.36
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity6.15
▷ Minimum method complexity1.00
▷ Maximum method complexity121.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods99
▷ Static methods1515.15%
▷ Public methods9191.92%
▷ Protected methods33.03%
▷ Private methods55.05%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
36 PNG files occupy 0.98MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/winter_bundle_logo_background_2.png357.75KB171.13KB▼ 52.16%
admin/images/avatars/business_avatar.png19.09KB7.27KB▼ 61.93%
admin/images/avatars/personal_avatar.png19.02KB7.39KB▼ 61.18%
admin/images/black_friday_greate_bundle_mobile.png18.39KB18.43KB0.00%
admin/images/sale.png1.96KB1.92KB▼ 1.70%