68% uji-countdown

Code Review | Uji Countdown

WordPress plugin Uji Countdown scored68%from 54 tests.

About plugin

  • Plugin page: uji-countdown
  • Plugin version: 2.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 24, 2012
  • Latest release: Mar 31, 2023
  • Number of updates: 162
  • Update frequency: every 25.2 days
  • Top authors: ujimoto (100%)

Code review

54 tests

User reviews

54 reviews

Install metrics

8,000+ active /338,678 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.42MB] [CPU: ▼3.73ms] Passed 4 tests

Server-side resources used by Uji Countdown
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4241.15 ▲0.16
Dashboard /wp-admin3.78 ▲0.4347.14 ▼13.23
Posts /wp-admin/edit.php3.83 ▲0.4750.18 ▲1.16
Add New Post /wp-admin/post-new.php6.31 ▲0.4284.67 ▼3.00
Media Library /wp-admin/upload.php3.64 ▲0.4138.43 ▲2.08
Uji Countdown /wp-admin/options-general.php?page=ujicountdown3.6132.30

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 114 new files
Database: 1 new table, 7 new options
New tables
wp_uji_counter
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
uji-countdown-version
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Uji Countdown
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.48 ▲0.081.71 ▼0.2347.00 ▲3.09
Dashboard /wp-admin2,207 ▲195.83 ▲0.95106.91 ▼10.8938.51 ▼9.34
Posts /wp-admin/edit.php2,093 ▲72.00 ▼0.0641.74 ▲3.3537.19 ▲0.20
Add New Post /wp-admin/post-new.php6,202 ▲4,68319.52 ▼3.76894.70 ▲200.0059.39 ▲7.58
Media Library /wp-admin/upload.php1,395 ▲74.17 ▼0.0098.81 ▼6.3742.39 ▼1.76
Uji Countdown /wp-admin/options-general.php?page=ujicountdown9342.1424.2144.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_uji_counter
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • uji-countdown-version
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/uji-countdown/assets/googlefonts.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/uji-countdown/views/admin.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

uji-countdown/ujicountdown.php 85% from 13 tests

"Uji Countdown" version 2.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("uji-countdown.php" instead of "ujicountdown.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin4,720 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript181361781,710
PHP123656921,666
CSS8180215698
PO File9129129387
Sass3291135
JSON200124

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity75.75
▷ Minimum class complexity51.00
▷ Maximum class complexity108.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods85
▷ Static methods910.59%
▷ Public methods6880.00%
▷ Protected methods22.35%
▷ Private methods1517.65%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
44 PNG files occupy 0.20MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-rec.png3.76KB2.63KB▼ 30.20%
assets/images/ucount-icon@x2.png10.36KB4.03KB▼ 61.04%
assets/images/align-right.png0.54KB0.57KB0.00%
assets/images/align-center.png0.56KB0.66KB0.00%
assets/images/ucount-icon.png5.62KB2.01KB▼ 64.30%