84% tempus-fugit

Code Review | Tempus Fugit

WordPress plugin Tempus Fugit scored84%from 54 tests.

About plugin

  • Plugin page: tempus-fugit
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.9-6.3
  • WordPress version: 6.3.1
  • First release: Mar 10, 2021
  • Latest release: Oct 21, 2023
  • Number of updates: 14
  • Update frequency: every 68.2 days
  • Top authors: dshanske (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /777 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.21MB] [CPU: ▼12.00ms] Passed 4 tests

A check of server-side resources used by Tempus Fugit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2337.58 ▼3.70
Dashboard /wp-admin3.52 ▲0.1846.06 ▼13.72
Posts /wp-admin/edit.php3.64 ▲0.2844.43 ▼0.67
Add New Post /wp-admin/post-new.php6.11 ▲0.2181.00 ▼29.90
Media Library /wp-admin/upload.php3.45 ▲0.2137.08 ▲0.80

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_tempus_onthisday_widget
widget_tempus_thisweek_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Tempus Fugit: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.26 ▼0.301.70 ▼0.2342.05 ▼0.16
Dashboard /wp-admin2,195 ▲175.57 ▼0.1480.74 ▼34.4236.97 ▼8.56
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0233.96 ▼5.1933.25 ▼4.57
Add New Post /wp-admin/post-new.php1,528 ▼723.08 ▲4.72682.61 ▲42.5750.11 ▼20.09
Media Library /wp-admin/upload.php1,403 ▲34.15 ▼0.0995.92 ▼4.9140.90 ▼0.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_tempus_thisweek_widget
    • widget_tempus_onthisday_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tempus-fugit/includes/class-tempus-onthisday-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/tempus-fugit/tempus-fugit.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Tempus_OnThisDay_Widget' not found in wp-content/plugins/tempus-fugit/includes/class-tempus-thisweek-widget.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: date, archive, onthisday, time

tempus-fugit/tempus-fugit.php Passed 13 tests

The main PHP script in "Tempus Fugit" version 1.1.2 is automatically included on every request by WordPress
48 characters long description:
Enhance your Time Based Experiences in WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,090 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP111271971,090

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.56
▷ Minimum class complexity7.00
▷ Maximum class complexity19.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods69
▷ Static methods5376.81%
▷ Public methods69100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin