84% wp-user-timezone

Code Review | WP User Timezone

WordPress plugin WP User Timezone scored84%from 54 tests.

About plugin

  • Plugin page: wp-user-timezone
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2016
  • Latest release: May 7, 2016
  • Number of updates: 17
  • Update frequency: every 0.8 days
  • Top authors: ravikatha (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,730 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.11MB] [CPU: ▼14.32ms] Passed 4 tests

An overview of server-side resources used by WP User Timezone
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7311.75 ▼27.25
Dashboard /wp-admin3.42 ▲0.0744.23 ▼24.76
Posts /wp-admin/edit.php3.53 ▲0.1744.72 ▲0.21
Add New Post /wp-admin/post-new.php6.00 ▲0.1192.32 ▼5.48
Media Library /wp-admin/upload.php3.34 ▲0.1137.00 ▲3.35
WP User Timezone /wp-admin/options-general.php?page=wp-user-timezone3.3330.05

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP User Timezone
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /5,307 ▲2,53617.16 ▲2.8534.57 ▲32.6149.06 ▲5.37
Dashboard /wp-admin2,213 ▲255.90 ▲0.01100.00 ▼15.6140.47 ▼1.02
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0340.21 ▼0.0131.07 ▼4.75
Add New Post /wp-admin/post-new.php1,536 ▲1723.37 ▲0.20669.25 ▲16.5550.27 ▲0.94
Media Library /wp-admin/upload.php1,392 ▲44.15 ▼0.0498.17 ▼6.8144.04 ▼2.72
WP User Timezone /wp-admin/options-general.php?page=wp-user-timezone9262.1723.7525.66

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_User_Timezone_Options' not found in wp-content/plugins/wp-user-timezone/admin/partials/wp-user-timezone-admin-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Plugin configuration) image not found
The official readme.txt might help

wp-user-timezone/wp-user-timezone.php Passed 13 tests

"WP User Timezone" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
83 characters long description:
Enables the date/time on the wordpress front-end to be displayed in user's timezone

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
There were no executable files found in this plugin640 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12156656544
JavaScript3143096

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods42
▷ Static methods37.14%
▷ Public methods3685.71%
▷ Protected methods00.00%
▷ Private methods614.29%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png41.35KB23.38KB▼ 43.45%