84% wp-countdown-block

Code Review | Countdown Block

WordPress plugin Countdown Block scored84%from 54 tests.

About plugin

  • Plugin page: wp-countdown-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.8.0
  • WordPress version: 6.3.1
  • First release: Jul 30, 2020
  • Latest release: Aug 3, 2021
  • Number of updates: 5
  • Update frequency: every 73.8 days
  • Top authors: ibachal (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /10,857 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.43ms] Passed 4 tests

An overview of server-side resources used by Countdown Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.29 ▼3.34
Dashboard /wp-admin3.32 ▲0.0245.01 ▼2.68
Posts /wp-admin/edit.php3.38 ▲0.0243.08 ▼3.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.74 ▼8.51
Media Library /wp-admin/upload.php3.25 ▲0.0234.03 ▲0.99

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Countdown Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.24 ▼0.131.65 ▼0.4837.96 ▼7.73
Dashboard /wp-admin2,192 ▲125.68 ▲0.0192.29 ▲2.3342.04 ▲2.96
Posts /wp-admin/edit.php2,103 ▲241.97 ▼0.0134.44 ▼4.4034.75 ▲0.53
Add New Post /wp-admin/post-new.php6,199 ▲4,67119.04 ▼4.01857.71 ▲247.6561.56 ▲11.74
Media Library /wp-admin/upload.php1,397 ▼04.20 ▲0.00101.82 ▲0.4541.14 ▼4.38

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
The following issues need your attention
  • 1× 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/wp-countdown-block/index.php:13

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 96% from 29 tests

readme.txt Passed 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
7 plugin tags: countdown timer, gutenberg countdown, block, timer block, coming soon...

wp-countdown-block/index.php 92% from 13 tests

"Countdown Block" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-countdown-block.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin215 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS270139
PHP4121865
JSON1009
JavaScript2002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected