78% timer

Code Review | Timer

WordPress plugin Timer scored78%from 54 tests.

About plugin

  • Plugin page: timer
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.6
  • WordPress version: 6.3.1
  • First release: Nov 29, 2013
  • Latest release: Dec 11, 2013
  • Number of updates: 4
  • Update frequency: every 3.0 days
  • Top authors: nitinmaurya12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,054 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 successfully, without throwing any errors or notices

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

Server-side resources used by Timer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.71 ▼1.10
Dashboard /wp-admin3.33 ▲0.0249.99 ▼2.42
Posts /wp-admin/edit.php3.38 ▲0.0251.07 ▼3.41
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.59 ▼15.54
Media Library /wp-admin/upload.php3.25 ▲0.0234.47 ▲0.32
Timer Settings /wp-admin/options-general.php?page=timer_setting3.1931.28

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Timer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.45 ▼0.958.30 ▲6.6342.33 ▼4.95
Dashboard /wp-admin2,199 ▲255.57 ▼0.0992.24 ▼0.7640.39 ▼1.62
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0836.35 ▼1.6232.45 ▼3.26
Add New Post /wp-admin/post-new.php1,529 ▲323.31 ▲0.27716.49 ▲33.9054.49 ▼6.91
Media Library /wp-admin/upload.php1,398 ▼24.16 ▼0.0299.43 ▼18.4940.62 ▼7.88
Timer Settings /wp-admin/options-general.php?page=timer_setting1,1102.0024.5529.92

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 does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=timer_setting
    • > Notice in wp-content/plugins/timer/timer.php+29
    Undefined index: act

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/timer/timer.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/timer/timersetting.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Show Timer), #2 (Timer setting)
The official readme.txt might help

timer/timer.php Passed 13 tests

The principal PHP file in "Timer" v. 1.0 is loaded by WordPress automatically on each request
79 characters long description:
This is Timer Plugin. So you can set any date as countdown. It shows days left.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin326 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25310167
JavaScript1311683
CSS112476

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png5.54KB3.31KB▼ 40.36%
screenshot-2.png20.29KB9.36KB▼ 53.86%