68% moein-dictionary-free

Code Review | Moein Dictionary(free)

WordPress plugin Moein Dictionary(free) scored68%from 54 tests.

About plugin

  • Plugin page: moein-dictionary-...
  • Plugin version: 1.5.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 16, 2022
  • Latest release: Mar 22, 2023
  • Number of updates: 5
  • Update frequency: every 19.2 days
  • Top authors: ham3da (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /457 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.41ms] Passed 4 tests

Server-side resources used by Moein Dictionary(free)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.43 ▼2.17
Dashboard /wp-admin3.34 ▲0.0447.91 ▲5.07
Posts /wp-admin/edit.php3.39 ▲0.0446.49 ▲0.36
Add New Post /wp-admin/post-new.php5.94 ▲0.0683.09 ▼10.44
Media Library /wp-admin/upload.php3.26 ▲0.0433.13 ▼1.38
Data installation /wp-admin/admin.php?page=mdict-data-intall3.2833.98
Settings /wp-admin/admin.php?page=mdict-settings3.2832.73
Add Word /wp-admin/admin.php?page=mdict-add3.2329.05
Words List /wp-admin/admin.php?page=mdict-words3.2433.21
Dashboard /wp-admin/admin.php?page=mdict3.2731.67

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 45 new files
Database: 1 new table, 7 new options
New tables
wp_pn_mdict
New WordPress options
can_compress_scripts
theysaidso_admin_options
mdict_page
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Moein Dictionary(free)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,004 ▲25813.96 ▼0.437.60 ▲5.7239.60 ▼4.99
Dashboard /wp-admin2,257 ▲665.88 ▼0.0095.88 ▼2.9243.78 ▲3.95
Posts /wp-admin/edit.php2,139 ▲502.16 ▲0.1033.95 ▼11.1234.80 ▼1.15
Add New Post /wp-admin/post-new.php1,558 ▲2517.63 ▼5.69656.19 ▲56.6868.01 ▲17.41
Media Library /wp-admin/upload.php1,439 ▲484.24 ▲0.0397.62 ▼7.9842.54 ▼1.49
Data installation /wp-admin/admin.php?page=mdict-data-intall9782.0523.6640.28
Settings /wp-admin/admin.php?page=mdict-settings9352.0423.0433.52
Add Word /wp-admin/admin.php?page=mdict-add8582.0724.6929.22
Words List /wp-admin/admin.php?page=mdict-words1,0352.0926.7736.92
Dashboard /wp-admin/admin.php?page=mdict8972.0324.8244.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_pn_mdict
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • mdict_page

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/moein-dictionary-free/inc/admin/add-word.php
    • > /wp-content/plugins/moein-dictionary-free/inc/admin/import-data.php
    • > /wp-content/plugins/moein-dictionary-free/moein-dictionary-free.php
    • > /wp-content/plugins/moein-dictionary-free/inc/admin/words-list.php
    • > /wp-content/plugins/moein-dictionary-free/inc/admin/dashboard.php
  • 15× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: current in wp-content/plugins/moein-dictionary-free/inc/pagination/render.inc.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/moein-dictionary-free/inc/functions.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/moein-dictionary-free/inc/admin/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/moein-dictionary-free/inc/templates/searchbox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/moein-dictionary-free/inc/shortcodes/searchbox.php:3
    • > PHP Notice
      Undefined variable: rpp in wp-content/plugins/moein-dictionary-free/inc/pagination/render.inc.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/moein-dictionary-free/inc/admin/data-template.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/moein-dictionary-free/inc/ajax.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'MDict_SearchTools' not found in wp-content/plugins/moein-dictionary-free/inc/admin/dashboard-template.php:2
    • > PHP Notice
      Undefined variable: total in wp-content/plugins/moein-dictionary-free/inc/pagination/render.inc.php on line 3

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: dictionary, moein, persian dictionary, persian, moein dictionary...

moein-dictionary-free/moein-dictionary-free.php 92% from 13 tests

The main file in "Moein Dictionary(free)" v. 1.5.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin40,554 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
SQL40037,585
PHP203122541,485
CSS611316850
JavaScript43156419
PO File1100135202
SVG11013

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity7.70
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods77
▷ Static methods2025.97%
▷ Public methods7496.10%
▷ Protected methods33.90%
▷ Private methods00.00%
Functions12
▷ Named functions758.33%
▷ Anonymous functions541.67%
Constants5
▷ Global constants5100.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
PNG images were not found in this plugin