83% formula-1-countdown-widget

Code Review | One Widget Countdown

WordPress plugin One Widget Countdown scored 83% from 54 tests.

About plugin

  • Plugin page: formula-1-countdo...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-6.1.1
  • WordPress version: 6.3.1
  • First release: May 10, 2012
  • Latest release: Mar 8, 2023
  • Number of updates: 10
  • Update frequency: every 395.5 days
  • Top authors: f1widget (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 4,473 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼12.14ms] Passed 4 tests

An overview of server-side resources used by One Widget Countdown
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.52 ▼37.82
Dashboard /wp-admin3.35 ▲0.0446.26 ▼1.96
Posts /wp-admin/edit.php3.40 ▲0.0450.62 ▲1.35
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.83 ▼3.06
Media Library /wp-admin/upload.php3.27 ▲0.0434.16 ▼5.71

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

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

Browser metrics Passed 4 tests

A check of browser resources used by One Widget Countdown
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.85 ▲0.541.70 ▼1.0942.04 ▼1.95
Dashboard /wp-admin2,206 ▲185.90 ▲0.01109.19 ▼4.8939.89 ▼6.08
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0540.76 ▲0.1635.27 ▼7.86
Add New Post /wp-admin/post-new.php1,542 ▲2818.08 ▲0.38606.76 ▼63.0953.31 ▼11.71
Media Library /wp-admin/upload.php1,388 ▲64.27 ▲0.0595.29 ▼7.4442.39 ▼2.97

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_f1_widget_plugin
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/formula-1-countdown-widget/class-f1widgetplugin.php:28

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

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === formula-1-countdown-widget === )
You can take inspiration from this readme.txt

formula-1-countdown-widget/class-f1widgetplugin.php 85% from 13 tests

The primary PHP file in "One Widget Countdown" version 2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 265 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("formula-1-countdown-widget.php" instead of "class-f1widgetplugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected180 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12143180

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.26
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
There are no PNG files in this plugin