10% cssable-countdown

Code Review | CSSable Countdown

WordPress plugin CSSable Countdown scored10%from 54 tests.

About plugin

  • Plugin page: cssable-countdown
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.9
  • WordPress version: 6.3.1
  • First release: Feb 5, 2014
  • Latest release: Apr 19, 2014
  • Number of updates: 21
  • Update frequency: every 3.5 days
  • Top authors: dmonnier (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /14,900 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/cssable-countdown/CSSable-Countdown.php+88
    Methods with the same name as their class will not be constructors in a future version of PHP; CSSable_Countdown_Widget has a deprecated constructor

Server metrics [RAM: ▼7.85MB] [CPU: ▼1,191,900.59ms] Passed 4 tests

A check of server-side resources used by CSSable Countdown
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.414.83 ▼39.85
Dashboard /wp-admin2.12 ▼24.886.12 ▼4,767,423.57
Posts /wp-admin/edit.php2.12 ▼1.287.23 ▼47.02
Add New Post /wp-admin/post-new.php2.12 ▼3.816.52 ▼91.93
Media Library /wp-admin/upload.php2.12 ▼1.165.17 ▼30.19

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 68 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_cssable-countdown
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
cssable-countdown_version
can_compress_scripts

Browser metrics Passed 4 tests

CSSable Countdown: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲15613.85 ▼0.7110.37 ▲8.8541.83 ▲1.13
Dashboard /wp-admin2,197 ▲205.56 ▼0.1191.15 ▼2.2341.51 ▲0.27
Posts /wp-admin/edit.php2,105 ▲22.02 ▲0.0737.09 ▼4.7735.30 ▲0.04
Add New Post /wp-admin/post-new.php1,545 ▲1918.21 ▼4.97628.48 ▼73.7364.75 ▲10.89
Media Library /wp-admin/upload.php1,396 ▼14.24 ▲0.0398.57 ▼3.6842.61 ▼4.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/cssable-countdown/CSSable-Countdown.php+88
    Methods with the same name as their class will not be constructors in a future version of PHP; CSSable_Countdown_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_cssable-countdown
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • cssable-countdown_version
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cssable-countdown/includes/shortcode.php:124
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cssable-countdown/includes/widget.php on line 5
    • > PHP Notice
      Undefined variable: widget_options in wp-content/plugins/cssable-countdown/includes/widget.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cssable-countdown/includes/widget.php on line 8
    • > PHP Notice
      Undefined variable: widget_options in wp-content/plugins/cssable-countdown/includes/widget.php on line 8
    • > PHP Warning
      array_push() expects parameter 1 to be array, null given in wp-content/plugins/cssable-countdown/includes/widget.php on line 35
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cssable-countdown/includes/widget.php on line 3
    • > PHP Notice
      Undefined variable: widget_options in wp-content/plugins/cssable-countdown/includes/widget.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function build_countdown_args() in wp-content/plugins/cssable-countdown/includes/widget.php:49
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cssable-countdown/includes/widget.php on line 6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: timer, css, countdown

cssable-countdown/CSSable-Countdown.php 92% from 13 tests

The entry point to "CSSable Countdown" version 1.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cssable-countdown.php" instead of "CSSable-Countdown.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,220 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52413141,149
PHP10223187941
CSS42722130

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity10.00
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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