10% stopwatch

Code Review | Stopwatch

WordPress plugin Stopwatch scored 10% from 54 tests.

About plugin

  • Plugin page: stopwatch
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 5.8.1
  • First release: Jan 5, 2013
  • Latest release: Jan 25, 2013
  • Number of updates: 12
  • Update frequency: every 1.7 days
  • Top authors: luisperezphd (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active / 2,512 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/stopwatch/MyPlugIn.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; iPadStopwatchWidget has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼195.13ms] Passed 4 tests

A check of server-side resources used by Stopwatch
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.77 ▼1.065.39 ▼33.07
Dashboard /wp-admin1.79 ▼1.265.13 ▼40.33
Posts /wp-admin/edit.php1.79 ▼1.316.29 ▼39.10
Add New Post /wp-admin/post-new.php1.79 ▼3.645.37 ▼668.03
Media Library /wp-admin/upload.php1.79 ▼1.216.22 ▼28.66

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options
widget_ipadstopwatchwidget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Stopwatch
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.90 ▼0.078.86 ▲0.0447.13 ▼3.45
Dashboard /wp-admin2,967 ▲365.89 ▼0.33152.49 ▼2.62105.06 ▼2.49
Posts /wp-admin/edit.php2,739 ▼02.83 ▲0.1368.18 ▼4.1488.60 ▼2.66
Add New Post /wp-admin/post-new.php1,604 ▼1118.59 ▼2.83389.45 ▲55.81108.93 ▲9.15
Media Library /wp-admin/upload.php1,807 ▼05.04 ▼0.01153.99 ▼13.01114.48 ▼4.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/stopwatch/MyPlugIn.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; iPadStopwatchWidget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_ipadstopwatchwidget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/stopwatch/MyPlugIn.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

stopwatch/MyPlugIn.php 92% from 13 tests

"Stopwatch" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("stopwatch.php" instead of "MyPlugIn.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected42 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111842

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin