94% inserttime

Code Review | insertTime

WordPress plugin insertTime scored 94% from 54 tests.

About plugin

  • Plugin page: inserttime
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 5.8.1
  • First release: Jan 20, 2013
  • Latest release: Jan 20, 2013
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: Shereefz (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,078 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼142.22ms] Passed 4 tests

A check of server-side resources used by insertTime
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0138.65 ▲2.88
Dashboard /wp-admin3.07 ▲0.0146.25 ▼5.18
Posts /wp-admin/edit.php3.12 ▲0.0147.78 ▼2.61
Add New Post /wp-admin/post-new.php5.42 ▼0.0196.42 ▼560.90
Media Library /wp-admin/upload.php3.01 ▲0.0136.15 ▼0.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for insertTime
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.30 ▲0.367.51 ▼2.6151.81 ▼0.75
Dashboard /wp-admin2,967 ▲365.90 ▼0.15141.91 ▼13.57112.40 ▼10.93
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0167.81 ▲0.9991.54 ▼4.40
Add New Post /wp-admin/post-new.php1,683 ▲18318.77 ▲0.02384.66 ▼12.75114.35 ▲2.19
Media Library /wp-admin/upload.php1,807 ▼35.01 ▼0.01149.95 ▼11.82124.91 ▲2.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
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 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/inserttime/insertTime.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: datetime, shortcodes, short code, time, date...

inserttime/insertTime.php 85% from 13 tests

This is the main PHP file of "insertTime" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("inserttime.php" instead of "insertTime.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 151 characters long)

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
No dangerous file extensions were detected42 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP192842

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.87KB8.25KB▼ 40.51%