84% ele-digital-clock

Code Review | Ele Digital Clock

WordPress plugin Ele Digital Clock scored84%from 54 tests.

About plugin

  • Plugin page: ele-digital-clock
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2.0
  • WordPress version: 6.3.1
  • First release: Feb 27, 2023
  • Latest release: May 17, 2023
  • Number of updates: 7
  • Update frequency: every 11.6 days
  • Top authors: javierbarroso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /316 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.69MB] [CPU: ▼7.43ms] Passed 4 tests

A check of server-side resources used by Ele Digital Clock
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.6941.89 ▼3.59
Dashboard /wp-admin3.99 ▲0.6949.30 ▼10.27
Posts /wp-admin/edit.php4.05 ▲0.6947.22 ▼3.14
Add New Post /wp-admin/post-new.php6.58 ▲0.6987.29 ▼12.73
Media Library /wp-admin/upload.php3.92 ▲0.6839.08 ▼0.19

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Ele Digital Clock
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.73 ▲0.171.76 ▲0.0942.04 ▼1.82
Dashboard /wp-admin2,209 ▲295.52 ▼0.0686.40 ▼4.0841.58 ▼0.07
Posts /wp-admin/edit.php2,117 ▲201.98 ▼0.0536.15 ▲2.1733.22 ▼1.87
Add New Post /wp-admin/post-new.php1,540 ▲523.07 ▲4.72613.10 ▼25.4953.66 ▼21.27
Media Library /wp-admin/upload.php1,420 ▲234.12 ▼0.0997.76 ▼9.1544.36 ▼1.77

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please fix the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/ele-digital-clock/includes/widgets/ele-digital-clock-widget.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/ele-digital-clock/includes/templates/template-digital-clock_02.php:22
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ele-digital-clock/includes/templates/template-digital-clock_01.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/ele-digital-clock/includes/templates/template-digital-clock_03.php:21
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/ele-digital-clock/includes/templates/template-digital-clock_01.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ele-digital-clock/includes/templates/template-digital-clock_01.php:23

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 uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: The official readme.txt might help

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

The main file in "Ele Digital Clock" v. 1.6.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
59 characters long description:
Fancy and customizable Digital Clock widgets for Elementor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,420 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP613743777
CSS2891561
JavaScript130268
SVG10014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.00
▷ Minimum class complexity8.00
▷ Maximum class complexity10.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods20
▷ Static methods15.00%
▷ Public methods1890.00%
▷ Protected methods210.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.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