90% timezone-conversion-widget

Code Review | Timezone Conversion Widget

WordPress plugin Timezone Conversion Widget scored90%from 54 tests.

About plugin

  • Plugin page: timezone-conversi...
  • Plugin version: 1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Sep 16, 2019
  • Latest release: Jan 28, 2022
  • Number of updates: 15
  • Update frequency: every 58.0 days
  • Top authors: kartikparmar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,000 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.09ms] Passed 4 tests

A check of server-side resources used by Timezone Conversion Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.46 ▼3.22
Dashboard /wp-admin3.37 ▲0.0749.18 ▲1.45
Posts /wp-admin/edit.php3.49 ▲0.1344.55 ▼3.82
Add New Post /wp-admin/post-new.php5.95 ▲0.06100.91 ▲12.65
Media Library /wp-admin/upload.php3.30 ▲0.0634.85 ▲1.25

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

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

Browser metrics Passed 4 tests

Timezone Conversion Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲13113.82 ▼0.6112.60 ▲10.6044.76 ▲1.36
Dashboard /wp-admin2,209 ▲214.88 ▼0.96106.14 ▼11.9738.21 ▼9.09
Posts /wp-admin/edit.php2,089 ▼01.98 ▲0.0239.59 ▼2.2531.49 ▼3.26
Add New Post /wp-admin/post-new.php1,533 ▲1923.42 ▲5.93654.74 ▼30.2752.54 ▼0.21
Media Library /wp-admin/upload.php1,382 ▼94.16 ▼0.08103.03 ▼1.1246.34 ▼0.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_tzc_timezone_conversion
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: timezone-conversion, convert-time, timezone-widget, timezone

timezone-conversion-widget/tzc-timezone-conversion.php 92% from 13 tests

The primary PHP file in "Timezone Conversion Widget" version 1.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("timezone-conversion-widget.php" instead of "tzc-timezone-conversion.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin355 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP374174310
PO File15723
JavaScript22621
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.00
▷ Minimum class complexity3.00
▷ Maximum class complexity9.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods650.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin