84% countdown-block

Code Review | Countdown Block

WordPress plugin Countdown Block scored84%from 54 tests.

About plugin

  • Plugin page: countdown-block
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jul 24, 2020
  • Latest release: Mar 30, 2023
  • Number of updates: 21
  • Update frequency: every 46.6 days
  • Top authors: wpdevteam (66.67%)alam789 (28.57%)re_enter_rupok (14.29%)

Code review

54 tests

User reviews

7 reviews

Install metrics

5,000+ active /40,343 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.21ms] Passed 4 tests

Analyzing server-side resources used by Countdown Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1848.65 ▲4.29
Dashboard /wp-admin3.45 ▲0.1548.24 ▼4.16
Posts /wp-admin/edit.php3.57 ▲0.2147.91 ▼0.92
Add New Post /wp-admin/post-new.php6.06 ▲0.1786.61 ▼5.65
Media Library /wp-admin/upload.php3.37 ▲0.1435.60 ▲1.88

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Countdown Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.17 ▼1.211.82 ▼0.3347.75 ▲2.31
Dashboard /wp-admin2,209 ▲384.85 ▼0.96100.84 ▼19.7738.03 ▼7.38
Posts /wp-admin/edit.php2,086 ▼32.04 ▼0.0139.53 ▲5.2936.67 ▲0.40
Add New Post /wp-admin/post-new.php1,648 ▲13424.20 ▲6.67673.08 ▼48.5261.09 ▲9.04
Media Library /wp-admin/upload.php1,391 ▲64.26 ▲0.08100.18 ▼2.0442.63 ▼1.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/countdown-block/countdown-block.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 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
9 plugin tags: coming soon, timer, gutenberg blocks, gutenberg, count down...

countdown-block/countdown-block.php Passed 13 tests

The principal PHP file in "Countdown Block" v. 1.2.6 is loaded by WordPress automatically on each request
47 characters long description:
Highlight Upcoming Events With Countdown Timer.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin806 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP10107165693
JavaScript715894
JSON20016
CSS3163

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity32.40
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity5.43
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods33
▷ Static methods1236.36%
▷ Public methods2987.88%
▷ Protected methods00.00%
▷ Private methods412.12%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin