90% analog-clock-display-widget

Code Review | Analog Clock display Widget

WordPress plugin Analog Clock display Widget scored90%from 54 tests.

About plugin

  • Plugin page: analog-clock-disp...
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 25, 2018
  • Latest release: Jul 26, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: nerghum (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,839 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Analog Clock display Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.60 ▼1.10
Dashboard /wp-admin3.33 ▲0.0249.73 ▲1.87
Posts /wp-admin/edit.php3.38 ▲0.0247.20 ▼4.47
Add New Post /wp-admin/post-new.php5.91 ▲0.02101.65 ▲0.83
Media Library /wp-admin/upload.php3.25 ▲0.0239.61 ▲1.90

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_nerghum_analog_clock
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Analog Clock display Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.42 ▲0.051.61 ▼0.1341.67 ▼4.63
Dashboard /wp-admin2,195 ▲155.56 ▼0.0984.95 ▼5.7641.37 ▼0.11
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0039.98 ▲2.4637.47 ▲2.09
Add New Post /wp-admin/post-new.php1,526 ▼1122.95 ▲4.81622.26 ▼21.0752.86 ▼26.13
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.01104.66 ▲0.0845.50 ▼2.01

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 detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_nerghum_analog_clock
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: analog clock, user timezone, clock display

analog-clock-display-widget/analog-clock.php 92% from 13 tests

The entry point to "Analog Clock display Widget" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("analog-clock-display-widget.php" instead of "analog-clock.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin118 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2182989
CSS11129

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/main.png0.22KB0.20KB▼ 5.86%
images/bg.png23.79KB24.95KB0.00%
images/sec.png7.95KB8.16KB0.00%
images/min.png6.51KB6.55KB0.00%
images/hour.png5.83KB5.92KB0.00%