72% clock-tik-tik

Code Review | Clock Tik Tik

WordPress plugin Clock Tik Tik scored72%from 54 tests.

About plugin

  • Plugin page: clock-tik-tik
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.9
  • WordPress version: 6.3.1
  • First release: May 26, 2022
  • Latest release: May 26, 2022
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: charlestsmith (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /703 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.67ms] Passed 4 tests

A check of server-side resources used by Clock Tik Tik
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0836.69 ▼7.61
Dashboard /wp-admin3.39 ▲0.0947.46 ▼6.65
Posts /wp-admin/edit.php3.45 ▲0.0957.46 ▼1.52
Add New Post /wp-admin/post-new.php5.98 ▲0.0989.71 ▼6.89
Media Library /wp-admin/upload.php3.32 ▲0.0938.12 ▲4.68
Add Clock /wp-admin/admin.php?page=MCWC_add_clock3.3532.10
Clock Tik Tik /wp-admin/admin.php?page=MCWC_listing3.2933.37

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Clock Tik Tik
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.34 ▼0.221.77 ▲0.1740.07 ▼1.92
Dashboard /wp-admin2,221 ▲415.62 ▼0.0591.61 ▲4.8937.43 ▼7.70
Posts /wp-admin/edit.php2,123 ▲202.00 ▲0.0240.00 ▲2.0536.68 ▲3.78
Add New Post /wp-admin/post-new.php1,545 ▲1923.27 ▼0.21665.52 ▲10.9963.77 ▲11.89
Media Library /wp-admin/upload.php1,423 ▲324.23 ▲0.09103.72 ▼1.0044.32 ▼3.21
Add Clock /wp-admin/admin.php?page=MCWC_add_clock4,6232.3352.2147.61
Clock Tik Tik /wp-admin/admin.php?page=MCWC_listing8272.0530.1524.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=MCWC_add_clock
    • > Notice in wp-content/plugins/clock-tik-tik/templates/add_new_clock_template.php+225
    Undefined variable: metadata
  • 36 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=MCWC_add_clock
    • > Notice in wp-content/plugins/clock-tik-tik/templates/add_new_clock_template.php+225
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=MCWC_add_clock
    • > Notice in wp-content/plugins/clock-tik-tik/inc/clock_setting.php+152
    Undefined variable: data
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=MCWC_add_clock
    • > Notice in wp-content/plugins/clock-tik-tik/templates/add_new_clock_template.php+220
    Undefined index: id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=MCWC_listing
    • > Notice in wp-content/plugins/clock-tik-tik/inc/clock_setting.php+129
    Undefined index: action

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/clock-tik-tik/clock-tik-tik.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=MCWC_add_clock
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=MCWC_add_clock 195 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=MCWC_add_clock
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=MCWC_add_clock 202 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=MCWC_add_clock
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=MCWC_add_clock 209 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=MCWC_add_clock
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=MCWC_add_clock 216 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=MCWC_add_clock
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=MCWC_add_clock 305 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=MCWC_add_clock
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=MCWC_add_clock 312 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed: Please take inspiration from this readme.txt

clock-tik-tik/clock-tik-tik.php Passed 13 tests

The entry point to "Clock Tik Tik" version 1.0 is a PHP file that has certain tags in its header comment area
44 characters long description:
Add any timezone clock in analog and digital

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,280 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP523068737
CSS3458473
JavaScript310470

PHP code Passed 2 tests

An overview of 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.20
Average class complexity14.50
▷ Minimum class complexity7.00
▷ Maximum class complexity22.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods321.43%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.67MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png134.35KB41.96KB▼ 68.77%
assets/banner-1544X500.png218.64KB86.56KB▼ 60.41%
assets/banner-772x250.png58.30KB22.29KB▼ 61.77%
assets/screenshot-1.png144.33KB46.16KB▼ 68.02%
assets/icon-256x256.png103.08KB32.94KB▼ 68.05%