73% ztr-zeumic-work-timer

Code Review | ZTR Zeumic Work Timer

WordPress plugin ZTR Zeumic Work Timer scored73%from 54 tests.

About plugin

  • Plugin page: ztr-zeumic-work-t...
  • Plugin version: 1.9.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 12, 2016
  • Latest release: Jun 14, 2023
  • Number of updates: 82
  • Update frequency: every 28.9 days
  • Top authors: zeumic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,723 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.67MB] [CPU: ▲1.96ms] Passed 4 tests

A check of server-side resources used by ZTR Zeumic Work Timer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6441.54 ▼1.36
Dashboard /wp-admin3.98 ▲0.6857.00 ▲8.81
Posts /wp-admin/edit.php4.03 ▲0.6856.17 ▲7.82
Add New Post /wp-admin/post-new.php6.58 ▲0.7093.39 ▼7.43
Media Library /wp-admin/upload.php3.91 ▲0.6848.12 ▲12.12
Zeumic Shared Settings /wp-admin/admin.php?page=zsc-settings3.8741.97
Export /wp-admin/admin.php?page=ztr-export3.8743.04
Use ZTR 0 /wp-admin/admin.php?page=ztr3.8845.05
Settings /wp-admin/admin.php?page=ztr-settings3.8743.52

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 61 new files
Database: 1 new table, 7 new options
New tables
wp_ztr_list
New WordPress options
widget_recent-comments
ztr_version
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for ZTR Zeumic Work Timer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲13313.66 ▼0.701.64 ▼0.0138.02 ▼0.11
Dashboard /wp-admin2,262 ▲715.84 ▲0.95106.83 ▲2.6939.30 ▼2.06
Posts /wp-admin/edit.php2,144 ▲582.00 ▼0.0135.56 ▲0.7535.04 ▼2.85
Add New Post /wp-admin/post-new.php1,573 ▲4018.78 ▼4.07613.58 ▼47.3355.45 ▼15.90
Media Library /wp-admin/upload.php1,447 ▲564.23 ▲0.0296.37 ▼5.1543.94 ▼2.18
Zeumic Shared Settings /wp-admin/admin.php?page=zsc-settings8682.1826.8625.83
Export /wp-admin/admin.php?page=ztr-export9102.4434.9627.56
Use ZTR 0 /wp-admin/admin.php?page=ztr1,2082.5748.9029.32
Settings /wp-admin/admin.php?page=ztr-settings8602.1825.2325.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_ztr_list
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • ztr_version
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Zeumic\\ZSC\\Core\\PluginDistributable' not found in wp-content/plugins/ztr-zeumic-work-timer/zsc/src/PluginExt.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Zeumic\\ZSC\\Core\\Singleton' not found in wp-content/plugins/ztr-zeumic-work-timer/zsc/src/Plugin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Zeumic\\ZSC\\Core\\Plugin' not found in wp-content/plugins/ztr-zeumic-work-timer/zsc/src/PluginDistributable.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Zeumic\\ZSC\\Core\\Plugin' not found in wp-content/plugins/ztr-zeumic-work-timer/zsc/src/Common.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Zeumic\\ZSC\\Core\\PluginCore' not found in wp-content/plugins/ztr-zeumic-work-timer/src/Plugin.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Zeumic\\ZSC\\Core\\PluginDistributable' not found in wp-content/plugins/ztr-zeumic-work-timer/zsc/src/PluginCore.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/ztr-zeumic-work-timer/zsc/zsc-zeumic-suite-common.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Zeumic\\ZSC\\Core\\trailingslashit() in wp-content/plugins/ztr-zeumic-work-timer/zsc/load.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Zeumic\\ZSC\\Core\\Singleton' not found in wp-content/plugins/ztr-zeumic-work-timer/zsc/src/PluginLoader.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/ztr-zeumic-work-timer/zsc/zsc-zeumic-suite-common.php:20

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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:
  • Tags: Please delete some tags, you are using 27 tag instead of maximum 10
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in ztr-zeumic-work-timer/assets to your readme.txt
The official readme.txt is a good inspiration

ztr-zeumic-work-timer/ztr-zeumic-work-timer.php 85% from 13 tests

The main file in "ZTR Zeumic Work Timer" v. 1.9.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 301 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected6,696 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript217832813,252
PHP184919132,535
CSS916182909

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity29.92
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes12
▷ Abstract classes541.67%
▷ Concrete classes758.33%
▷ Final classes00.00%
Methods186
▷ Static methods52.69%
▷ Public methods17091.40%
▷ Protected methods63.23%
▷ Private methods105.38%
Functions37
▷ Named functions1643.24%
▷ Anonymous functions2156.76%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
9 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
zsc/vendor/jquery-ui/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
zsc/vendor/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
zsc/vendor/jquery-ui/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
img/stop.png0.61KB0.64KB0.00%
zsc/img/refresh.png14.89KB0.50KB▼ 96.65%