84% doomsday-clock

Code Review | Doomsday Clock

WordPress plugin Doomsday Clock scored 84% from 54 tests.

About plugin

  • Plugin page: doomsday-clock
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-5.2.2
  • WordPress version: 6.3.1
  • First release: Apr 19, 2019
  • Latest release: Jun 20, 2019
  • Number of updates: 8
  • Update frequency: every 7.8 days
  • Top authors: thebigdotco (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 894 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▲2.38ms] Passed 4 tests

Analyzing server-side resources used by Doomsday Clock
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.54 ▲2.49
Dashboard /wp-admin3.32 ▲0.0148.20 ▲1.74
Posts /wp-admin/edit.php3.43 ▲0.0846.80 ▲2.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.51 ▲2.75
Media Library /wp-admin/upload.php3.24 ▲0.0138.20 ▲3.51

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 86 new files
Database: no new tables, 7 new options
New WordPress options
widget_wpb_widget
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Doomsday Clock
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲1713.32 ▲0.155.59 ▲3.7245.86 ▼7.49
Dashboard /wp-admin2,209 ▼05.87 ▲0.0398.01 ▼3.6939.80 ▼2.53
Posts /wp-admin/edit.php2,086 ▼02.00 ▼0.0537.42 ▲1.0734.95 ▲2.09
Add New Post /wp-admin/post-new.php1,514 ▼017.60 ▲0.07662.87 ▼3.1266.11 ▲14.29
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.02107.81 ▲1.2349.07 ▲1.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_wpb_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • 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 no errors were found, this is by no means 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 fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/doomsday-clock/widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/doomsday-clock/index.php:14

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: doomsday clock, doomsday, clock

doomsday-clock/index.php 92% from 13 tests

The entry point to "Doomsday Clock" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("doomsday-clock.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected2,567 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
PHP34379522,485
SVG820082

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity122.67
▷ Minimum class complexity16.00
▷ Maximum class complexity223.00
Average method complexity5.15
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods88
▷ Static methods11.14%
▷ Public methods7382.95%
▷ Protected methods1517.05%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected