84% captain-countdown-clock

Code Review | Captain Countdown Clock

WordPress plugin Captain Countdown Clock scored84%from 54 tests.

About plugin

  • Plugin page: captain-countdown...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Feb 23, 2016
  • Latest release: Aug 22, 2016
  • Number of updates: 16
  • Update frequency: every 11.3 days
  • Top authors: spokanetony (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,638 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.92ms] Passed 4 tests

A check of server-side resources used by Captain Countdown Clock
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.59 ▼1.89
Dashboard /wp-admin3.36 ▲0.0655.39 ▼4.28
Posts /wp-admin/edit.php3.41 ▲0.0649.37 ▼3.18
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.32 ▼26.33
Media Library /wp-admin/upload.php3.28 ▲0.0542.46 ▲7.11
Captain Countdown /wp-admin/options-general.php?page=captain-countdown-clock3.3035.04

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
captain_countdown_version
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Captain Countdown Clock
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12913.83 ▼0.559.05 ▲7.2141.72 ▼2.96
Dashboard /wp-admin2,205 ▲255.74 ▲0.1792.18 ▼1.4742.98 ▼3.34
Posts /wp-admin/edit.php2,110 ▲132.44 ▲0.4535.87 ▲0.5733.82 ▼2.76
Add New Post /wp-admin/post-new.php1,535 ▲923.59 ▼0.05694.10 ▲7.7367.96 ▲13.59
Media Library /wp-admin/upload.php1,407 ▲104.47 ▲0.19110.99 ▲3.6146.57 ▼0.78
Captain Countdown /wp-admin/options-general.php?page=captain-countdown-clock4,1231.9836.0738.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • captain_countdown_version
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/captain-countdown-clock/includes/shortcode.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/captain-countdown-clock/includes/instructions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/captain-countdown-clock/captain-countdown-clock.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: countdown clock, clock, timer

captain-countdown-clock/captain-countdown-clock.php 85% from 13 tests

The main PHP file in "Captain Countdown Clock" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 167 characters long)

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
No dangerous file extensions were detected627 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP49476489
JavaScript221594
CSS16044

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png91.44KB19.94KB▼ 78.20%
assets/screenshot-2.png38.33KB15.16KB▼ 60.44%
assets/opacity.png0.18KB0.09KB▼ 46.67%