90% otfm-countdown-to-new-year-block

Code Review | OtFm Countdown to New Year block

WordPress plugin OtFm Countdown to New Year block scored90%from 54 tests.

About plugin

  • Plugin page: otfm-countdown-to...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Dec 14, 2018
  • Latest release: Dec 1, 2020
  • Number of updates: 8
  • Update frequency: every 89.8 days
  • Top authors: Otshelnik-Fm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,511 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.17ms] Passed 4 tests

An overview of server-side resources used by OtFm Countdown to New Year block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.65 ▼1.00
Dashboard /wp-admin3.32 ▼0.0345.77 ▼13.05
Posts /wp-admin/edit.php3.37 ▲0.0145.30 ▼1.03
Add New Post /wp-admin/post-new.php6.99 ▲1.1087.11 ▲3.93
Media Library /wp-admin/upload.php3.25 ▲0.0135.45 ▲2.40

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for OtFm Countdown to New Year block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲23114.98 ▲0.7626.72 ▲24.8745.79 ▼4.24
Dashboard /wp-admin2,206 ▲215.86 ▼0.04104.85 ▼9.9539.46 ▼5.13
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0239.27 ▲0.0237.52 ▲5.65
Add New Post /wp-admin/post-new.php6,360 ▲4,84627.93 ▲10.34824.81 ▲152.5536.14 ▼24.77
Media Library /wp-admin/upload.php1,382 ▼34.22 ▲0.0295.96 ▼0.8541.00 ▲0.43

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: Invalid version format
The official readme.txt might help

otfm-countdown-to-new-year-block/otfm-countdown-to-new-year-block.php Passed 13 tests

The primary PHP file in "OtFm Countdown to New Year block" version 1.0.3 is used by WordPress to initiate all plugin functionality
75 characters long description:
For new block editor (Gutenberg) countdown to new year. Block for WordPress

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
Success! There were no dangerous files found in this plugin555 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33330412
PHP2224260
Markdown136050
CSS10033

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected