82% fancy-top-bar-countdown

Code Review | Fancy Top Bar Countdown

WordPress plugin Fancy Top Bar Countdown scored 82% from 54 tests.

About plugin

  • Plugin page: fancy-top-bar-cou...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Apr 13, 2016
  • Latest release: Apr 13, 2016
  • Number of updates: 7
  • Update frequency: every 0.9 days
  • Top authors: 99plugins (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active / 4,346 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.44ms] Passed 4 tests

Server-side resources used by Fancy Top Bar Countdown
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.15 ▼8.60
Dashboard /wp-admin3.45 ▲0.1547.57 ▼2.55
Posts /wp-admin/edit.php3.50 ▲0.1451.11 ▼0.43
Add New Post /wp-admin/post-new.php5.99 ▲0.1096.34 ▲1.83
Media Library /wp-admin/upload.php3.31 ▲0.0838.36 ▲2.69
Top Bar Count Down /wp-admin/admin.php?page=nn-count-down3.8351.12

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 91 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_countdown_99plugin
theysaidso_admin_options

Browser metrics Passed 4 tests

Fancy Top Bar Countdown: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲22114.27 ▼0.139.36 ▲7.3937.55 ▼6.50
Dashboard /wp-admin2,244 ▲564.97 ▼0.90100.96 ▼4.6942.63 ▼2.69
Posts /wp-admin/edit.php2,130 ▲382.25 ▲0.2041.15 ▲0.0434.98 ▼0.13
Add New Post /wp-admin/post-new.php1,556 ▲2618.67 ▲0.36628.65 ▲3.6555.89 ▲4.29
Media Library /wp-admin/upload.php1,426 ▲384.44 ▲0.2395.48 ▼8.1341.76 ▲0.33
Top Bar Count Down /wp-admin/admin.php?page=nn-count-down15,3464.77143.9332.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_countdown_99plugin
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/fancy-top-bar-countdown/includes/class-nn-settings-options.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'WP_widget' not found in wp-content/plugins/fancy-top-bar-countdown/includes/widget-nn-count-down.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-top-bar-countdown/includes/admin-menus.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-top-bar-countdown/includes/scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/fancy-top-bar-countdown/includes/functions.php:93
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/fancy-top-bar-countdown/includes/framework/bootstrap.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-top-bar-countdown/includes/framework/init.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/fancy-top-bar-countdown/includes/framework/select2/cmb-field-select2.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/fancy-top-bar-countdown/includes/shortcode-nn-count-down.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

fancy-top-bar-countdown/init.php 62% from 13 tests

The main file in "Fancy Top Bar Countdown" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "4.1")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("fancy-top-bar-countdown.php" instead of "init.php")
  • Domain Path: The domain path must begin with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected19,964 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
CSS132,0641,21111,060
PHP281,1892,4004,631
JavaScript143968683,633
SVG100640

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity33.78
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods219
▷ Static methods2210.05%
▷ Public methods20593.61%
▷ Protected methods83.65%
▷ Private methods62.74%
Functions55
▷ Named functions55100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants880.00%
▷ Class constants220.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
18 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/framework/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
includes/framework/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
includes/framework/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
includes/framework/select2/js/select2/select2x2.png0.83KB0.77KB▼ 6.15%
assets/img/pattern.png2.74KB0.10KB▼ 96.43%