68% viavi-wp-timeline

Code Review | Viavi WordPress Timeline

WordPress plugin Viavi WordPress Timeline scored68%from 54 tests.

About plugin

  • Plugin page: viavi-wp-timeline
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0.1
  • WordPress version: 6.3.1
  • First release: Aug 22, 2014
  • Latest release: Jan 12, 2015
  • Number of updates: 12
  • Update frequency: every 12.0 days
  • Top authors: viaviwebtech (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

60+ active /7,297 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
Install script ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼40.52ms] Passed 4 tests

Analyzing server-side resources used by Viavi WordPress Timeline
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.73 ▼0.93
Dashboard /wp-admin3.05 ▼0.2925.46 ▼38.20
Posts /wp-admin/edit.php3.05 ▼0.3024.07 ▼24.89
Add New Post /wp-admin/post-new.php3.05 ▼2.8324.83 ▼88.55
Media Library /wp-admin/upload.php3.05 ▼0.1823.89 ▼10.42

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 85 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Viavi WordPress Timeline: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,982 ▲23613.66 ▼0.7412.73 ▲10.9541.37 ▼3.43
Dashboard /wp-admin2,212 ▲215.84 ▲0.03105.53 ▲5.7370.73 ▲27.78
Posts /wp-admin/edit.php2,110 ▲241.98 ▼0.0234.42 ▼3.2734.58 ▼1.71
Add New Post /wp-admin/post-new.php1,685 ▲15722.58 ▲4.15682.57 ▲83.5746.95 ▼9.24
Media Library /wp-admin/upload.php1,400 ▲94.20 ▼0.02109.64 ▲13.2345.46 ▲1.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 17× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/viavi-wp-timeline/Admin/Event/EditEventForm.php
    • > /wp-content/plugins/viavi-wp-timeline/footer.php
    • > /wp-content/plugins/viavi-wp-timeline/WordPressTimelineFunction.php
    • > /wp-content/plugins/viavi-wp-timeline/Admin/Event/NewEventPost.php
    • > /wp-content/plugins/viavi-wp-timeline/Admin/Help.php
    • > /wp-content/plugins/viavi-wp-timeline/Admin/Group/GroupList.php
    • > /wp-content/plugins/viavi-wp-timeline/Admin/Group/NewGroupPost.php
    • > /wp-content/plugins/viavi-wp-timeline/Admin/Group/EditGroupPost.php
    • > /wp-content/plugins/viavi-wp-timeline/Admin/Event/EventList.php
    • > /wp-content/plugins/viavi-wp-timeline/Admin/Event/NewEventForm.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/viavi-wp-timeline/WordPressTimelineFunction.php:140
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/viavi-wp-timeline/index.php on line 16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Timeline list), #2 (Add new timeline), #3 (Event list), #4 (Add new event), #5 (Timeline style), #6 (Help)
You can look at the official readme.txt

viavi-wp-timeline/index.php 92% from 13 tests

The principal PHP file in "Viavi WordPress Timeline" v. 1.0 is loaded by WordPress automatically on each request
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 ("viavi-wp-timeline.php" instead of "index.php")

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
No dangerous file extensions were detected2,505 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
CSS10243891,284
PHP1833697919
JavaScript63935169
PO File1545133

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
35 PNG files occupy 0.44MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/viavi-wp-timeline-logo.png1.48KB1.55KB0.00%
Admin/Css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
images/viavi-wp-timeline-icon.png0.67KB0.68KB0.00%
screenshot-5.png38.97KB13.01KB▼ 66.62%
screenshot-3.png46.75KB15.65KB▼ 66.53%