84% gntt-timezone-clock

Code Review | GNTT Timezone Clock

WordPress plugin GNTT Timezone Clock scored84%from 54 tests.

About plugin

  • Plugin page: gntt-timezone-clock
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 24, 2016
  • Latest release: Mar 26, 2016
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: golzarrahman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /831 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: ▼3.37ms] Passed 4 tests

An overview of server-side resources used by GNTT Timezone Clock
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.37 ▼3.88
Dashboard /wp-admin3.31 ▲0.0150.14 ▼1.47
Posts /wp-admin/edit.php3.36 ▲0.0147.92 ▲6.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.49 ▼8.80
Media Library /wp-admin/upload.php3.23 ▲0.0134.89 ▲0.69

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

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

Browser metrics Passed 4 tests

Checking browser requirements for GNTT Timezone Clock
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲12813.60 ▼1.059.09 ▲7.0742.44 ▼7.62
Dashboard /wp-admin2,208 ▲175.85 ▲1.0099.12 ▼11.0343.25 ▼1.00
Posts /wp-admin/edit.php2,091 ▼12.03 ▲0.0240.90 ▲0.9135.33 ▼0.70
Add New Post /wp-admin/post-new.php1,530 ▼1423.47 ▲5.27652.21 ▲40.7261.13 ▲12.20
Media Library /wp-admin/upload.php1,390 ▼14.18 ▼0.0496.56 ▲3.7540.29 ▼1.84

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gntt-timezone-clock/gntt-time-zone-clock.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: timezone clock, gntt, clock, timezone, gntt clock...

gntt-timezone-clock/gntt-time-zone-clock.php 92% from 13 tests

"GNTT Timezone Clock" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gntt-timezone-clock.php" instead of "gntt-time-zone-clock.php")

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 plugin84 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS15040
PHP111423
JavaScript113021

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/minhand2.png1.10KB0.22KB▼ 80.34%
images/screenshot.png17.83KB8.81KB▼ 50.61%
images/clockface2.png13.19KB6.10KB▼ 53.72%
images/hourhand2.png1.12KB0.25KB▼ 78.19%
images/sechand2.png1.59KB0.93KB▼ 41.40%