10% killed-dolphins-counter

Code Review | Killed Dolphins Counter

WordPress plugin Killed Dolphins Counter scored10%from 54 tests.

About plugin

  • Plugin page: killed-dolphins-c...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Nov 4, 2015
  • Latest release: Dec 2, 2016
  • Number of updates: 19
  • Update frequency: every 22.5 days
  • Top authors: Bill Ball (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,113 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/killed-dolphins-counter/modules/widgets.php+56
    Function create_function() is deprecated

Server metrics [RAM: ▼1.94MB] [CPU: ▼53.63ms] Passed 4 tests

Server-side resources used by Killed Dolphins Counter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.34 ▼33.73
Dashboard /wp-admin2.08 ▼1.266.71 ▼56.64
Posts /wp-admin/edit.php2.09 ▼1.277.58 ▼34.15
Add New Post /wp-admin/post-new.php2.08 ▼3.815.94 ▼90.00
Media Library /wp-admin/upload.php2.09 ▼1.155.26 ▼29.50

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_dolphins_widget
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Killed Dolphins Counter: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,061 ▲31515.42 ▲1.245.27 ▲3.4041.36 ▼4.07
Dashboard /wp-admin2,354 ▲1696.48 ▲1.61129.25 ▲11.5838.77 ▼6.45
Posts /wp-admin/edit.php2,302 ▲2133.35 ▲1.3949.57 ▲13.0431.63 ▲0.55
Add New Post /wp-admin/post-new.php1,533 ▲1423.15 ▼0.10607.95 ▼98.4033.33 ▼20.03
Media Library /wp-admin/upload.php1,388 ▼34.02 ▼0.2183.57 ▼29.9540.05 ▼7.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/killed-dolphins-counter/modules/widgets.php+56
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_dolphins_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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 0% 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 fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/killed-dolphins-counter/modules/starter.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/killed-dolphins-counter/modules/shortcodes.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/killed-dolphins-counter/modules/widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/killed-dolphins-counter/modules/scripts.php:3
    • > PHP Notice
      Undefined index: start in wp-content/plugins/killed-dolphins-counter/modules/starter.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/killed-dolphins-counter/modules/shortcodes.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: dolphins, countdown, killed

killed-dolphins-counter/wp-killed-dolphins-countdown.php 85% from 13 tests

The primary PHP file in "Killed Dolphins Counter" version 1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 149 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("killed-dolphins-counter.php" instead of "wp-killed-dolphins-countdown.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin10,839 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS411810,617
PHP53623191
JavaScript210731

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/images/Dying_Dolphins_Logo.png28.57KB5.51KB▼ 80.71%
modules/images/red_dolphin.png8.51KB5.51KB▼ 35.26%
modules/inc/assets/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
modules/inc/assets/img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/inc/assets/css/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%