90% wpml-widgets

Code Review | WPML Widgets

WordPress plugin WPML Widgets scored90%from 54 tests.

About plugin

  • Plugin page: wpml-widgets
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7
  • WordPress version: 6.3.1
  • First release: Apr 9, 2014
  • Latest release: Jan 4, 2017
  • Number of updates: 17
  • Update frequency: every 58.9 days
  • Top authors: sormano (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

10,000+ active /164,670 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.32ms] Passed 4 tests

This is a short check of server-side resources used by WPML Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.60 ▼9.77
Dashboard /wp-admin3.32 ▲0.0252.11 ▼3.00
Posts /wp-admin/edit.php3.37 ▲0.0253.84 ▼1.18
Add New Post /wp-admin/post-new.php5.90 ▲0.02104.65 ▲6.40
Media Library /wp-admin/upload.php3.25 ▲0.0240.10 ▲4.68

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WPML Widgets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲1114.24 ▼0.391.64 ▼0.1940.89 ▼3.35
Dashboard /wp-admin2,200 ▲205.64 ▼0.0288.77 ▼13.3143.17 ▼2.51
Posts /wp-admin/edit.php2,108 ▲82.15 ▲0.1734.88 ▼4.5535.86 ▲1.28
Add New Post /wp-admin/post-new.php1,534 ▲523.22 ▼0.14678.53 ▼16.1057.54 ▲8.63
Media Library /wp-admin/upload.php1,408 ▲84.20 ▲0.01113.01 ▲0.1248.28 ▲2.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (One widget per language), #2 (Different widgets for every language)
You can look at the official readme.txt

wpml-widgets/wpml-widgets.php Passed 13 tests

The main file in "WPML Widgets" v. 1.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
64 characters long description:
Easily select which widgets you want to show for which languages

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin72 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15011872

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.42
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.70KB2.78KB▼ 82.28%
screenshot-2.png55.05KB17.89KB▼ 67.50%