83% awesome-clock-widget

Code Review | Awesome Clock Widget

WordPress plugin Awesome Clock Widget scored83%from 54 tests.

About plugin

  • Plugin page: awesome-clock-widget
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Mar 26, 2017
  • Latest release: Jun 16, 2019
  • Number of updates: 12
  • Update frequency: every 67.5 days
  • Top authors: raihancse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,200 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.03MB] [CPU: ▼3.70ms] Passed 4 tests

Analyzing server-side resources used by Awesome Clock Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.03 ▼3.80
Dashboard /wp-admin3.34 ▲0.0344.57 ▼3.41
Posts /wp-admin/edit.php3.39 ▲0.0345.80 ▼1.49
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.78 ▼6.11
Media Library /wp-admin/upload.php3.26 ▲0.0334.66 ▲0.68

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_worldclock_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Awesome Clock Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.051.64 ▼0.0741.59 ▼1.44
Dashboard /wp-admin2,203 ▲155.79 ▼0.0997.16 ▼2.0836.67 ▼7.00
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0140.32 ▼0.9834.24 ▼1.71
Add New Post /wp-admin/post-new.php1,542 ▲918.49 ▼4.42609.91 ▼31.6546.63 ▼4.36
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.1994.15 ▼4.6542.66 ▼0.27

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_worldclock_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • 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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/awesome-clock-widget/index.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === awesome-clock-widget === )
  • Screenshots: Add an image for screenshot #2 (This is the second screen shot)
You can look at the official readme.txt

awesome-clock-widget/index.php 92% from 13 tests

The entry point to "Awesome Clock Widget" version 2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("awesome-clock-widget.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected3,135 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript46563322,759
CSS110250281
PHP1311595

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin