10% quick-localization

Code Review | Quick Localization (Quick Localisation)

WordPress plugin Quick Localization (Quick Localisation) scored10%from 54 tests.

About plugin

  • Plugin page: quick-localization
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.3.2
  • WordPress version: 6.3.1
  • First release: Apr 27, 2012
  • Latest release: Aug 2, 2014
  • Number of updates: 22
  • Update frequency: every 37.7 days
  • Top authors: Name.ly (86.36%)Namely (18.18%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /29,434 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▼1.83MB] [CPU: ▼50.99ms] Passed 4 tests

An overview of server-side resources used by Quick Localization (Quick Localisation)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.305.69 ▼29.68
Dashboard /wp-admin2.19 ▼1.127.27 ▼39.87
Posts /wp-admin/edit.php2.19 ▼1.177.40 ▼47.13
Add New Post /wp-admin/post-new.php2.19 ▼3.706.54 ▼87.27
Media Library /wp-admin/upload.php2.19 ▼1.056.07 ▼26.71
Import /wp-admin/admin.php?page=ql-import2.196.89
Edit /wp-admin/admin.php?page=ql-home2.198.03
Settings /wp-admin/admin.php?page=ql-settings2.197.60
Export /wp-admin/admin.php?page=ql-export2.198.13

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: 1 new table, 7 new options
New tables
wp_ql
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
ql_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Quick Localization (Quick Localisation)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8814.76 ▲0.381.80 ▲0.2244.69 ▲5.20
Dashboard /wp-admin2,243 ▲555.82 ▲0.92102.28 ▼4.8080.42 ▲40.26
Posts /wp-admin/edit.php2,126 ▲372.02 ▲0.0335.19 ▼3.3232.88 ▼3.49
Add New Post /wp-admin/post-new.php1,542 ▲2823.13 ▲5.64761.70 ▲105.9051.21 ▼18.76
Media Library /wp-admin/upload.php1,416 ▲314.22 ▲0.02101.49 ▲3.7571.59 ▲29.93
Import /wp-admin/admin.php?page=ql-import8782.0123.9029.98
Edit /wp-admin/admin.php?page=ql-home9262.0223.7040.77
Settings /wp-admin/admin.php?page=ql-settings1,0862.0424.0731.41
Export /wp-admin/admin.php?page=ql-export8142.0322.6623.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_ql
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • ql_options
    • 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
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ql-export
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ql-export
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
  • 44 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ql-export
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=ql-import
    • > Notice in wp-content/plugins/quick-localization/ql_import.php+57
    Undefined index: ql_import_overwrite
    • > GET request to /wp-admin/admin.php?page=ql-import
    • > Notice in wp-content/plugins/quick-localization/ql_import.php+58
    Undefined index: ql_import_clear
    • > GET request to /wp-admin/admin.php?page=ql-home
    • > Notice in wp-content/plugins/quick-localization/ql_edit.php+124
    Undefined index: qlenonce

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/quick-localization/ql_admin.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Edit page) image required
  • Tags: You are using too many tags: 215 tag instead of maximum 10
The official readme.txt might help

quick-localization/index.php 92% from 13 tests

The principal PHP file in "Quick Localization (Quick Localisation)" v. 0.1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("quick-localization.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin859 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP822349840
HTML14019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity73.00
▷ Minimum class complexity73.00
▷ Maximum class complexity73.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.21MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/language skills-256.png111.61KB31.10KB▼ 72.14%
images/select-language-48.png2.57KB1.96KB▼ 23.76%
images/select-language-16.png0.59KB0.65KB0.00%
images/select-language-24.png1.01KB1.25KB0.00%
images/language skills-128.png38.02KB10.00KB▼ 73.71%