78% simple-countdown

Code Review | Simple Countdown Timer

WordPress plugin Simple Countdown Timer scored78%from 54 tests.

About plugin

  • Plugin page: simple-countdown
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2023
  • Latest release: Jun 23, 2023
  • Number of updates: 6
  • Update frequency: every 25.7 days
  • Top authors: grandplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /557 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.95MB] [CPU: ▼6.25ms] Passed 4 tests

A check of server-side resources used by Simple Countdown Timer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.41 ▲0.9440.53 ▼3.55
Dashboard /wp-admin4.31 ▲0.9650.02 ▼14.18
Posts /wp-admin/edit.php4.36 ▲1.0049.48 ▲5.70
Add New Post /wp-admin/post-new.php6.83 ▲0.9485.28 ▼12.96
Media Library /wp-admin/upload.php4.17 ▲0.9443.09 ▲7.66
Simple Countdown /wp-admin/edit.php?post_type=gpls_wpsctr_timer4.2141.74
Quick Countdown Generator /wp-admin/edit.php?post_type=gpls_wpsctr_timer&page=gpls-wpsctr-simple-countdown-timer-page4.3238.24
Add New /wp-admin/post-new.php?post_type=gpls_wpsctr_timer4.7763.71

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Countdown Timer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲16813.90 ▼0.376.53 ▲4.5539.86 ▼6.10
Dashboard /wp-admin2,253 ▲765.06 ▼0.6192.45 ▼6.6932.93 ▼8.93
Posts /wp-admin/edit.php2,163 ▲632.23 ▲0.2940.20 ▲3.1929.85 ▼4.81
Add New Post /wp-admin/post-new.php1,554 ▲2623.39 ▼0.05646.44 ▼26.7959.69 ▼0.91
Media Library /wp-admin/upload.php1,433 ▲394.16 ▼0.01104.43 ▲8.6754.77 ▲11.84
Simple Countdown /wp-admin/edit.php?post_type=gpls_wpsctr_timer1,1322.4135.0723.17
Quick Countdown Generator /wp-admin/edit.php?post_type=gpls_wpsctr_timer&page=gpls-wpsctr-simple-countdown-timer-page3,1883.09109.2653.04
Add New /wp-admin/post-new.php?post_type=gpls_wpsctr_timer7,49110.16379.21178.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WPSCTR\\Base' not found in wp-content/plugins/simple-countdown/includes/Settings/SettingsFields/Field.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WPSCTR\\pages\\AdminPage' not found in wp-content/plugins/simple-countdown/includes/Pages/CountdownTimerPage.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WPSCTR\\Pages\\PagesBase\\AdminPage' not found in wp-content/plugins/simple-countdown/includes/Pages/QuickCountdownTimerPage.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WPSCTR\\Base' not found in wp-content/plugins/simple-countdown/includes/Settings/SettingsFields/FieldBase.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=gpls_wpsctr_timer
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught Error: FlipDown: Constructor expected unix timestamp, got undefined instead.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: countdown, timer, countdown timer, time tracking

simple-countdown/gpls-wpsctr-simple-countdown-timer.php 92% from 13 tests

The principal PHP file in "Simple Countdown Timer" v. 1.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-countdown.php" instead of "gpls-wpsctr-simple-countdown-timer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected4,770 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
PHP506551,8674,393
Sass4485301
JavaScript910670
CSS6056

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity16.61
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces14
Interfaces0
Traits7
Classes26
▷ Abstract classes415.38%
▷ Concrete classes2284.62%
▷ Final classes00.00%
Methods243
▷ Static methods5623.05%
▷ Public methods16668.31%
▷ Protected methods3715.23%
▷ Private methods4016.46%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/Core/assets/dist/images/logo-icon-lg.png3.56KB2.72KB▼ 23.62%
includes/Core/assets/dist/images/full-logo.png6.58KB3.86KB▼ 41.28%
includes/Core/assets/dist/images/logo-icon-sm.png0.62KB0.72KB0.00%
includes/Core/assets/dist/images/logo-icon-md.png0.91KB0.96KB0.00%