84% era-digital-clock

Code Review | My Digital Clock

WordPress plugin My Digital Clock scored84%from 54 tests.

About plugin

  • Plugin page: era-digital-clock
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2023
  • Latest release: Mar 7, 2023
  • Number of updates: 6
  • Update frequency: every 1.8 days
  • Top authors: eraplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /156 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.00MB] [CPU: ▼13.89ms] Passed 4 tests

This is a short check of server-side resources used by My Digital Clock
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.09 ▼1.37
Dashboard /wp-admin3.31 ▼0.0345.04 ▼14.22
Posts /wp-admin/edit.php3.36 ▲0.0144.55 ▼5.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.41 ▼34.95
Media Library /wp-admin/upload.php3.23 ▲0.0136.35 ▲3.48

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

My Digital Clock: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.141.80 ▲0.1040.18 ▲0.22
Dashboard /wp-admin2,209 ▲185.86 ▲0.7999.24 ▼4.4739.87 ▼2.42
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0139.19 ▼7.7836.02 ▲1.21
Add New Post /wp-admin/post-new.php1,536 ▼623.35 ▲5.28683.88 ▲33.4455.00 ▲1.83
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.04108.50 ▲9.1247.61 ▲6.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/era-digital-clock/my-digital-clock.php:64

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Screenshot #1 (The digital clock in action.) image not found
The official readme.txt is a good inspiration

era-digital-clock/my-digital-clock.php 92% from 13 tests

This is the main PHP file of "My Digital Clock" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("era-digital-clock.php" instead of "my-digital-clock.php")

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
Everything looks great! No dangerous files found in this plugin46 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181246

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin