74% time-machine

Code Review | Time Machine

WordPress plugin Time Machine scored74%from 54 tests.

About plugin

  • Plugin page: time-machine
  • Plugin version: 0.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1
  • WordPress version: 6.3.1
  • First release: Feb 14, 2009
  • Latest release: Dec 28, 2020
  • Number of updates: 33
  • Update frequency: every 131.4 days
  • Top authors: urkekg (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /6,813 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.22ms] Passed 4 tests

Analyzing server-side resources used by Time Machine
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.83 ▼3.38
Dashboard /wp-admin3.39 ▲0.0855.38 ▼1.22
Posts /wp-admin/edit.php3.44 ▲0.0855.79 ▲3.76
Add New Post /wp-admin/post-new.php5.97 ▲0.0890.25 ▼19.04
Media Library /wp-admin/upload.php3.31 ▲0.0841.54 ▲2.76

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_time-machine
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Time Machine
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.321.66 ▼0.0139.70 ▼1.70
Dashboard /wp-admin2,198 ▲215.67 ▲0.0186.59 ▼8.5742.10 ▼2.37
Posts /wp-admin/edit.php2,097 ▼61.96 ▼0.0636.22 ▼0.8833.81 ▼3.99
Add New Post /wp-admin/post-new.php1,533 ▼223.24 ▲4.98650.11 ▼7.4255.93 ▼10.74
Media Library /wp-admin/upload.php1,400 ▼34.24 ▼0.00101.01 ▲0.3047.59 ▲5.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Incomplete uninstall procedure, leaving 14 files (0.04MB) in the plugin directory
    • (new file) languages/messages.pot
    • (new file) languages/tm-sr_RS.po
    • (new file) languages/tm-by_BY.mo
    • (new file) languages/tm-zh_CN.mo
    • (new file) inc/widget.php
    • (new file) languages/tm-sr_RS.mo
    • (new file) languages/tm-it_IT.po
    • (new file) inc/index.php
    • (new file) languages/tm-by_BY.po
    • (new file) languages/tm-it_IT.mo
    • ...
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_time-machine

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/time-machine/inc/widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
The official readme.txt is a good inspiration

time-machine/time-machine.php Passed 13 tests

The entry point to "Time Machine" version 0.4.1 is a PHP file that has certain tags in its header comment area
93 characters long description:
Widget to list articles published in past, relative to current date by specified time offset.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected497 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP411190306
PO File47388191

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity28.50
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity8.86
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin