94% wp-dead-mans-snitch

Code Review | WP Dead Man's Snitch

WordPress plugin WP Dead Man's Snitch scored 94% from 54 tests.

About plugin

  • Plugin page: wp-dead-mans-snitch
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-4.3.0
  • WordPress version: 5.8.1
  • First release: Aug 22, 2015
  • Latest release: Aug 22, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: adelessert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 726 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼145.15ms] Passed 4 tests

An overview of server-side resources used by WP Dead Man's Snitch
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0234.52 ▲3.25
Dashboard /wp-admin3.09 ▲0.0340.00 ▼8.88
Posts /wp-admin/edit.php3.14 ▲0.0338.97 ▼9.48
Add New Post /wp-admin/post-new.php5.44 ▲0.0191.31 ▼561.44
Media Library /wp-admin/upload.php3.03 ▲0.0232.60 ▼0.79
Dead Man's Snitch /wp-admin/options-general.php?page=wpdms-settings3.0027.66

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WP Dead Man's Snitch: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.81 ▲0.1111.96 ▲3.1749.06 ▲1.81
Dashboard /wp-admin2,975 ▲386.04 ▲0.04141.37 ▼1.65108.85 ▼6.21
Posts /wp-admin/edit.php2,744 ▲52.72 ▼0.0063.81 ▲0.1688.83 ▲1.73
Add New Post /wp-admin/post-new.php1,904 ▲40419.22 ▲0.73380.25 ▲23.82111.71 ▼3.65
Media Library /wp-admin/upload.php1,815 ▲85.05 ▲0.00148.40 ▼0.00119.62 ▼4.28
Dead Man's Snitch /wp-admin/options-general.php?page=wpdms-settings1,0452.0955.0362.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-dead-mans-snitch/wp-deadmanssnitch.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-dead-mans-snitch/admin-form.inc.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-dead-mans-snitch === )
You can take inspiration from this readme.txt

wp-dead-mans-snitch/wp-deadmanssnitch.php 92% from 13 tests

Analyzing the main PHP file in "WP Dead Man's Snitch" version 0.1.0
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-dead-mans-snitch.php" instead of "wp-deadmanssnitch.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin82 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP215782

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions00.00%
▷ Anonymous functions7100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
No PNG files were detected