78% language-downloader

Code Review | Language Downloader

WordPress plugin Language Downloader scored78%from 54 tests.

About plugin

  • Plugin page: language-downloader
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Sep 9, 2014
  • Latest release: Oct 10, 2023
  • Number of updates: 42
  • Update frequency: every 79.0 days
  • Top authors: kzoschke (76.19%)kraftbj (26.19%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,463 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Language Downloader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.93 ▼2.17
Dashboard /wp-admin3.32 ▲0.0140.65 ▼11.18
Posts /wp-admin/edit.php3.37 ▲0.0149.91 ▲2.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0176.44 ▼16.10
Media Library /wp-admin/upload.php3.24 ▲0.0135.87 ▲1.88
Language Downloader /wp-admin/tools.php?page=ld_language_downloader3.83484.10

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Language Downloader
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.73 ▲0.341.85 ▲0.1635.70 ▼0.20
Dashboard /wp-admin2,199 ▲195.64 ▼0.0393.60 ▲6.9540.66 ▼0.81
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0732.88 ▼2.7130.18 ▼5.70
Add New Post /wp-admin/post-new.php1,529 ▼823.11 ▲5.11659.77 ▲54.7249.26 ▼25.91
Media Library /wp-admin/upload.php1,404 ▲74.16 ▼0.1094.94 ▼4.3641.73 ▼0.27
Language Downloader /wp-admin/tools.php?page=ld_language_downloader1,3191.9920.62105.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 131 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=ld_language_downloader
    • > Notice in wp-content/plugins/language-downloader/language-downloader.php+54
    Undefined index: lang
  • 131 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=ld_language_downloader
    • > Notice in wp-content/plugins/language-downloader/language-downloader.php+55
    Undefined variable: selected

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/language-downloader/language-downloader.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: languages, translation

language-downloader/language-downloader.php 92% from 13 tests

The primary PHP file in "Language Downloader" version 0.4 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
No dangerous file extensions were detected169 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JSX111688
JSON11045
PHP1111535
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions3
▷ Named functions3100.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