10% countdown-flipclock

Code Review | CountDown FlipClock

WordPress plugin CountDown FlipClock scored 10% from 54 tests.

About plugin

  • Plugin page: countdown-flipclock
  • Plugin version: 2.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-4.9.7
  • WordPress version: 6.3.1
  • First release: Dec 11, 2015
  • Latest release: Jul 19, 2018
  • Number of updates: 73
  • Update frequency: every 13.1 days
  • Top authors: bluelevel (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 9,261 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/countdown-flipclock/FlipClock.php+42
    Undefined variable: allow_url_include

Server metrics [RAM: ▼1.96MB] [CPU: ▼58.30ms] Passed 4 tests

A check of server-side resources used by CountDown FlipClock
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.98 ▼36.01
Dashboard /wp-admin2.05 ▼1.265.80 ▼59.67
Posts /wp-admin/edit.php2.05 ▼1.317.75 ▼47.42
Add New Post /wp-admin/post-new.php2.05 ▼3.845.44 ▼88.01
Media Library /wp-admin/upload.php2.05 ▼1.185.65 ▼38.10
Add new FlipClock /wp-admin/post-new.php?post_type=cdfc2.057.08
Added FlipClocks /wp-admin/edit.php?post_type=cdfc2.056.04

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

CountDown FlipClock: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲15214.46 ▼0.315.60 ▲3.4642.46 ▼11.07
Dashboard /wp-admin2,272 ▲695.31 ▼0.52114.65 ▼25.0040.48 ▼12.19
Posts /wp-admin/edit.php2,163 ▲742.41 ▲0.4345.48 ▲5.1449.46 ▲12.68
Add New Post /wp-admin/post-new.php1,569 ▲3223.50 ▲0.31658.36 ▼102.8336.71 ▼33.14
Media Library /wp-admin/upload.php1,457 ▲724.70 ▲0.56101.52 ▼27.6945.46 ▼12.20
Add new FlipClock /wp-admin/post-new.php?post_type=cdfc1,9943.03103.1681.85
Added FlipClocks /wp-admin/edit.php?post_type=cdfc1,1312.5744.3839.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/countdown-flipclock/FlipClock.php+42
    Undefined variable: allow_url_include
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cdfc
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/countdown-flipclock/FlipClock.php+42
    Undefined variable: allow_url_include

SRP 50% from 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
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/countdown-flipclock/FlipTinymce/FlipTinyMCE.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/countdown-flipclock/FlipIncludes/FlipMetaboxes.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/countdown-flipclock/FlipIncludes/FlipFiles.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/countdown-flipclock/FlipIncludes/FlipMisc.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/countdown-flipclock/FlipIncludes/FlipShortcode.php:109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/countdown-flipclock/FlipIncludes/FlipCustomPost.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: 3d effect, countdown timer, countdown, animation, 3d...

countdown-flipclock/FlipClock.php 85% from 13 tests

"CountDown FlipClock" version 2.7.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("countdown-flipclock.php" instead of "FlipClock.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 218 characters long)

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
Success! There were no dangerous files found in this plugin371 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP77178363
CSS42124
JavaScript4184

PHP code Passed 2 tests

A short review of 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.27
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
FlipTinymce/mce.png0.67KB0.73KB0.00%