83% countdown-timer-infinite

Code Review | Countdown Timer Infinite

WordPress plugin Countdown Timer Infinite scored83%from 54 tests.

About plugin

  • Plugin page: countdown-timer-i...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 1, 2022
  • Latest release: Oct 10, 2023
  • Number of updates: 13
  • Update frequency: every 42.9 days
  • Top authors: faridmia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /758 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.34ms] Passed 4 tests

This is a short check of server-side resources used by Countdown Timer Infinite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.33 ▼3.53
Dashboard /wp-admin3.55 ▲0.2558.21 ▲4.22
Posts /wp-admin/edit.php3.60 ▲0.2454.55 ▲3.97
Add New Post /wp-admin/post-new.php6.04 ▲0.1695.68 ▼5.34
Media Library /wp-admin/upload.php3.39 ▲0.1636.46 ▼4.46
Countdown Timer Infinite /wp-admin/options-general.php?page=countdown_timer_cdt3.3837.92

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 9 new options
New WordPress options
cdt_inf_basics
db_upgraded
widget_recent-posts
countdowncdt_timer_installed
theysaidso_admin_options
cdt_inf_color
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Countdown Timer Infinite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,059 ▲29815.07 ▲0.516.86 ▲5.0742.19 ▼3.03
Dashboard /wp-admin2,355 ▲1756.33 ▲0.80106.91 ▲15.1736.28 ▼6.60
Posts /wp-admin/edit.php2,286 ▲1863.49 ▲1.4554.17 ▲16.4334.26 ▼1.36
Add New Post /wp-admin/post-new.php1,543 ▲1723.65 ▲0.42629.68 ▼60.4236.72 ▼29.30
Media Library /wp-admin/upload.php1,423 ▲204.40 ▲0.2282.81 ▼16.0843.85 ▼0.82
Countdown Timer Infinite /wp-admin/options-general.php?page=countdown_timer_cdt2,0894.7498.5327.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_recent-comments
    • cdt_inf_basics
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • countdowncdt_timer_installed
    • widget_theysaidso_widget
    • cdt_inf_color
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/countdown-timer-infinite/includes/countdown-cdt-enqueue.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_add_inline_style() in wp-content/plugins/countdown-timer-infinite/includes/functions.php:90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_add_inline_style() in wp-content/plugins/countdown-timer-infinite/includes/functions.php:90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/countdown-timer-infinite/includes/class-countdown-final.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed: The official readme.txt is a good inspiration

countdown-timer-infinite/countdown-timer-infinite.php 85% from 13 tests

This is the main PHP file of "Countdown Timer Infinite" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 154 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,962 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP163333741,314
JavaScript251140524
CSS21210105
JSON20019

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity18.75
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods81
▷ Static methods1619.75%
▷ Public methods7896.30%
▷ Protected methods00.00%
▷ Private methods33.70%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin