90% wp-digital-clock

Code Review | Wp Digital clock

WordPress plugin Wp Digital clock scored 90% from 54 tests.

About plugin

  • Plugin page: wp-digital-clock
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 25, 2020
  • Latest release: Feb 27, 2023
  • Number of updates: 14
  • Update frequency: every 67.7 days
  • Top authors: amanhstu (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active / 1,135 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.30ms] Passed 4 tests

An overview of server-side resources used by Wp Digital clock
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0139.14 ▼6.02
Dashboard /wp-admin3.31 ▲0.0046.31 ▼4.86
Posts /wp-admin/edit.php3.36 ▲0.0045.75 ▼1.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.61 ▼12.91
Media Library /wp-admin/upload.php3.23 ▲0.0037.17 ▲4.16

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

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

Browser metrics Passed 4 tests

Wp Digital clock: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.57 ▼1.232.64 ▲0.7242.18 ▼3.75
Dashboard /wp-admin2,209 ▲304.87 ▼0.06101.96 ▼0.1638.20 ▼4.42
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0736.24 ▼4.9134.28 ▼0.98
Add New Post /wp-admin/post-new.php1,514 ▼517.64 ▼5.84687.73 ▲78.7462.58 ▲13.92
Media Library /wp-admin/upload.php1,388 ▼04.30 ▲0.1495.97 ▼12.1939.82 ▼8.35

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 ()
You can take inspiration from this readme.txt

wp-digital-clock/wp-digital-clock.php Passed 13 tests

The main file in "Wp Digital clock" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
81 characters long description:
This is an awesome digital clock that you can use in wp using shortcode or widget

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
Success! There were no dangerous files found in this plugin64 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP239729
JavaScript14023
CSS12112

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png7.06KB3.16KB▼ 55.34%
screenshot-2.png14.24KB6.45KB▼ 54.68%