84% back-to-the-future

Code Review | Back to the Future

WordPress plugin Back to the Future scored84%from 54 tests.

About plugin

  • Plugin page: back-to-the-future
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-4.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2015
  • Latest release: Feb 6, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: valeriosza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,428 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.68ms] Passed 4 tests

Server-side resources used by Back to the Future
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.74 ▼2.89
Dashboard /wp-admin3.32 ▲0.0146.57 ▼6.83
Posts /wp-admin/edit.php3.37 ▲0.0148.84 ▲2.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.05 ▲0.98
Media Library /wp-admin/upload.php3.24 ▲0.0137.53 ▲2.87

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Back to the Future: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.18 ▼1.411.75 ▼0.1539.49 ▼6.40
Dashboard /wp-admin2,206 ▲184.83 ▼1.03100.53 ▼0.7539.65 ▼2.02
Posts /wp-admin/edit.php2,092 ▼02.01 ▼0.0340.18 ▲0.1231.85 ▼5.12
Add New Post /wp-admin/post-new.php1,514 ▼1417.67 ▼0.32661.48 ▲64.6766.85 ▲14.51
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.05106.80 ▲9.4246.19 ▲2.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please 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_filter() in wp-content/plugins/back-to-the-future/back-to-the-future.php:11

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 88% 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
These attributes need to be fixed:
  • Screenshots: Please a description for screenshot #2 in back-to-the-future/assets to your readme.txt
  • Tags: You are using too many tags: 17 tag instead of maximum 10
The official readme.txt might help

back-to-the-future/back-to-the-future.php Passed 13 tests

The main PHP script in "Back to the Future" version 1.0 is automatically included on every request by WordPress
33 characters long description:
Allow future posts to be visible.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin44 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16844

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions2
▷ Named functions2100.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
No PNG files were detected