84% wp-flipclock

Code Review | WP Flipclock

WordPress plugin WP Flipclock scored84%from 54 tests.

About plugin

  • Plugin page: wp-flipclock
  • Plugin version: 1.8.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-6.4
  • WordPress version: 6.3.1
  • First release: Mar 16, 2014
  • Latest release: Oct 26, 2023
  • Number of updates: 29
  • Update frequency: every 121.2 days
  • Top authors: rhyswynne (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /35,029 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.00MB] [CPU: ▼4.53ms] Passed 4 tests

This is a short check of server-side resources used by WP Flipclock
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.13 ▲0.03
Dashboard /wp-admin3.31 ▲0.0041.00 ▼4.29
Posts /wp-admin/edit.php3.36 ▲0.0043.51 ▲0.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.94 ▼12.05
Media Library /wp-admin/upload.php3.23 ▲0.0035.29 ▼1.80

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Flipclock
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲11313.64 ▼0.749.62 ▲8.0142.43 ▲2.06
Dashboard /wp-admin2,198 ▲235.62 ▼0.0591.38 ▼4.9737.23 ▼4.59
Posts /wp-admin/edit.php2,097 ▼32.04 ▲0.0836.06 ▲0.9832.35 ▼2.72
Add New Post /wp-admin/post-new.php1,526 ▼222.97 ▼0.22646.27 ▼33.4151.66 ▼0.04
Media Library /wp-admin/upload.php1,394 ▼04.20 ▲0.0393.51 ▼4.1840.53 ▼5.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WPFLIP_WIDGET_PLUGIN_PATH - assumed 'WPFLIP_WIDGET_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-flipclock/inc/core.php on line 3
    • > PHP Warning
      require_once(WPFLIP_WIDGET_PLUGIN_PATH/inc/enqueue.php): failed to open stream: No such file or directory in wp-content/plugins/wp-flipclock/inc/core.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-flipclock/inc/enqueue.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'WPFLIP_WIDGET_PLUGIN_PATH/inc/enqueue.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-flipclock/inc/core.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-flipclock/inc/display.php:159
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-flipclock/inc/enqueue.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: timers, countdown, clocks, flipclock, countups...

wp-flipclock/index.php 92% from 13 tests

The main PHP file in "WP Flipclock" ver. 1.8.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-flipclock.php" instead of "index.php")

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 plugin491 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS2919364
PHP44523126
JavaScript1011

PHP code Passed 2 tests

This is a very shot 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.34
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%
Functions4
▷ Named functions4100.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