84% dispatch-countdown

Code Review | Dispatch Countdown

WordPress plugin Dispatch Countdown scored 84% from 54 tests.

About plugin

  • Plugin page: dispatch-countdown
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.3
  • WordPress version: 6.3.1
  • First release: Dec 10, 2019
  • Latest release: Dec 17, 2019
  • Number of updates: 10
  • Update frequency: every 0.7 days
  • Top authors: mardellme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 571 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.61ms] Passed 4 tests

An overview of server-side resources used by Dispatch Countdown
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.53 ▼4.30
Dashboard /wp-admin3.31 ▲0.0046.53 ▼2.33
Posts /wp-admin/edit.php3.36 ▲0.0048.84 ▼0.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.78 ▼13.92
Media Library /wp-admin/upload.php3.23 ▲0.0035.28 ▼1.88

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dispatch Countdown
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.201.71 ▼0.1441.57 ▼3.24
Dashboard /wp-admin2,209 ▲245.90 ▼0.1399.39 ▼3.3341.01 ▼4.41
Posts /wp-admin/edit.php2,092 ▼02.06 ▲0.0038.34 ▼6.5036.21 ▼0.88
Add New Post /wp-admin/post-new.php1,542 ▲918.76 ▼4.68653.62 ▼16.9359.94 ▼19.24
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0291.68 ▼7.5641.31 ▼3.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/dispatch-countdown/vendor/khill/php-duration/test/DurationTest.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% 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: dispatch, countdown, woocommerce

dispatch-countdown/dispatch-countdown.php 92% from 13 tests

"Dispatch Countdown" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "2.2")

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
Everything looks great! No dangerous files found in this plugin1,683 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP183387391,195
XML23560120
JSON400119
JavaScript39276
PO File1243468
Markdown118059
YAML214042
CSS2004

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.60
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods80
▷ Static methods45.00%
▷ Public methods7188.75%
▷ Protected methods00.00%
▷ Private methods911.25%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin