61% hurrytimer

Code Review | HurryTimer - An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce

WordPress plugin HurryTimer - An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce scored61%from 54 tests.

About plugin

  • Plugin page: hurrytimer
  • Plugin version: 2.9.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 8, 2018
  • Latest release: Oct 4, 2023
  • Number of updates: 150
  • Update frequency: every 11.9 days
  • Top authors: nlemsieh (100%)

Code review

54 tests

User reviews

131 reviews

Install metrics

20,000+ active /291,544 total downloads

Benchmarks

Plugin footprint 65% 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: ▲1.02MB] [CPU: ▲12.39ms] Passed 4 tests

An overview of server-side resources used by HurryTimer - An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.57 ▲1.1149.73 ▲10.04
Dashboard /wp-admin4.32 ▲1.0258.66 ▲11.79
Posts /wp-admin/edit.php4.37 ▲1.0262.39 ▲14.24
Add New Post /wp-admin/post-new.php6.92 ▲1.04118.81 ▲26.09
Media Library /wp-admin/upload.php4.24 ▲1.0148.85 ▲13.47
Add Campaign /wp-admin/post-new.php?post_type=hurrytimer_countdown4.8666.02
Settings /wp-admin/admin.php?page=hurrytimer_settings4.2841.57
All Campaigns /wp-admin/edit.php?post_type=hurrytimer_countdown4.3250.33

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 274 new files
Database: 1 new table, 9 new options
New tables
wp_hurrytimer_evergreen
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
hurrytimer_upgraded_2_2_28
hurrytimer_version
hurrytimer_css_build_hash

Browser metrics Passed 4 tests

This is an overview of browser requirements for HurryTimer - An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲18313.28 ▼1.022.20 ▲0.4636.96 ▼9.58
Dashboard /wp-admin2,307 ▲1255.88 ▲0.07102.06 ▼9.6238.44 ▼2.76
Posts /wp-admin/edit.php2,190 ▲982.03 ▼0.0140.25 ▼0.3130.64 ▼3.98
Add New Post /wp-admin/post-new.php1,556 ▲2323.36 ▲0.27618.23 ▼36.8755.85 ▼10.38
Media Library /wp-admin/upload.php1,492 ▲1044.24 ▲0.04101.80 ▼1.8142.17 ▼4.69
Add Campaign /wp-admin/post-new.php?post_type=hurrytimer_countdown4,6647.17317.16132.63
Settings /wp-admin/admin.php?page=hurrytimer_settings1,2833.7254.8825.95
All Campaigns /wp-admin/edit.php?post_type=hurrytimer_countdown1,5453.7953.1827.93

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_hurrytimer_evergreen
  • The uninstall procedure has failed, leaving 9 options in the database
    • theysaidso_admin_options
    • hurrytimer_version
    • widget_recent-posts
    • hurrytimer_css_build_hash
    • widget_recent-comments
    • hurrytimer_upgraded_2_2_28
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hurrytimer/admin/templates/wc-condition-group.php
    • > /wp-content/plugins/hurrytimer/admin/templates/actions-tab.php
    • > /wp-content/plugins/hurrytimer/vendor/symfony/translation/Resources/bin/translation-status.php
    • > /wp-content/plugins/hurrytimer/admin/templates/upgrade-banner.php
    • > /wp-content/plugins/hurrytimer/admin/templates/footer-rate-plugin.php
    • > /wp-content/plugins/hurrytimer/admin/templates/customcss-tab-content.php
  • 89× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HTSymfony\\Component\\Translation\\PluralizationRules' not found in wp-content/plugins/hurrytimer/includes/Dependencies/Carbon/Lang/oc.php:12
    • > PHP Notice
      Undefined index: argc in wp-content/plugins/hurrytimer/vendor/symfony/translation/Resources/bin/translation-status.php on line 46
    • > PHP Fatal error
      Uncaught Error: Interface 'HTSymfony\\Contracts\\Translation\\TranslatorInterface' not found in wp-content/plugins/hurrytimer/vendor/symfony/translation/LoggingTranslator.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'HTSymfony\\Component\\Translation\\Loader\\FileLoader' not found in wp-content/plugins/hurrytimer/vendor/symfony/translation/Loader/JsonFileLoader.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'HTSymfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass' not found in wp-content/plugins/hurrytimer/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'HTSymfony\\Component\\Translation\\Dumper\\FileDumper' not found in wp-content/plugins/hurrytimer/vendor/symfony/translation/Dumper/PhpFileDumper.php:21
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/hurrytimer/admin/templates/actions-tab.php on line 17
    • > PHP Notice
      Undefined index: argv in wp-content/plugins/hurrytimer/vendor/symfony/translation/Resources/bin/translation-status.php on line 47
    • > PHP Warning
      include(): Failed opening 'HURRYT_DIRadmin/templates/wc-condition.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/hurrytimer/admin/templates/wc-condition-group.php on line 10
    • > PHP Warning
      array_slice() expects parameter 1 to be array, null given in wp-content/plugins/hurrytimer/vendor/symfony/translation/Resources/bin/translation-status.php on line 54

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=hurrytimer_countdown
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=hurrytimer_countdown 1300 The specified value "auto" cannot be parsed, or is out of range.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (16 tag instead of maximum 10)
  • Screenshots: These screenshots require images: #9 (Call-to-Action button settings), #10 (Sticky Bar settings)
The official readme.txt is a good inspiration

hurrytimer/hurrytimer.php 92% from 13 tests

Analyzing the main PHP file in "HurryTimer - An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce" version 2.9.2
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "3.0.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected65,119 lines of code in 250 files:
LanguageFilesBlank linesComment linesLines of code
CSS48,5043029,240
PHP2213,8278,56119,540
JavaScript101,5861,60111,997
XSD392482,803
JSON500760
PO File2322392675
SVG502104

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 159)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity19.77
▷ Minimum class complexity1.00
▷ Maximum class complexity265.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity159.00
Code structure
Namespaces24
Interfaces16
Traits3
Classes96
▷ Abstract classes66.25%
▷ Concrete classes9093.75%
▷ Final classes11.11%
Methods1,116
▷ Static methods20618.46%
▷ Public methods95785.75%
▷ Protected methods676.00%
▷ Private methods928.24%
Functions116
▷ Named functions6656.90%
▷ Anonymous functions5043.10%
Constants120
▷ Global constants97.50%
▷ Class constants11192.50%
▷ Public constants111100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
assets/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%
(invalid) assets/images/action.png1.47KB0.00KB▼ 100.00%
(invalid) assets/images/store.png0.65KB0.00KB▼ 100.00%
(invalid) assets/images/timer.png1.59KB0.00KB▼ 100.00%