78% session-rewind

Code Review | Session Rewind

WordPress plugin Session Rewind scored 78% from 54 tests.

About plugin

  • Plugin page: session-rewind
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2023
  • Latest release: Feb 19, 2023
  • Number of updates: 7
  • Update frequency: every 1.3 days
  • Top authors: yairsr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 603 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.93ms] Passed 4 tests

Server-side resources used by Session Rewind
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.67 ▼8.36
Dashboard /wp-admin3.38 ▲0.0744.13 ▼4.19
Posts /wp-admin/edit.php3.49 ▲0.1345.58 ▲0.93
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.92 ▼16.10
Media Library /wp-admin/upload.php3.30 ▲0.0737.73 ▲2.93
Session Rewind /wp-admin/options-general.php?page=session-rewind-options3.2638.68

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
session_rewind_start_recording
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Session Rewind: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14213.64 ▼0.584.71 ▲2.8838.02 ▼4.09
Dashboard /wp-admin2,213 ▲255.79 ▼0.0695.52 ▼2.0139.15 ▼6.81
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0533.83 ▼2.2933.06 ▼1.72
Add New Post /wp-admin/post-new.php1,531 ▲1218.48 ▼4.78655.69 ▼26.7064.41 ▲2.22
Media Library /wp-admin/upload.php1,392 ▲44.22 ▲0.0195.83 ▼0.9942.78 ▼3.81
Session Rewind /wp-admin/options-general.php?page=session-rewind-options7812.0323.7428.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • session_rewind_start_recording
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/session-rewind/public/partials/session-rewind-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/session-rewind/admin/partials/session-rewind-admin-settings-display.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === session-rewind === )
  • Screenshots: Screenshot #1 (Plugin Configuration) image required
You can take inspiration from this readme.txt

session-rewind/session-rewind.php Passed 13 tests

The main file in "Session Rewind" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
42 characters long description:
Accurately record every session and issue.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected365 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12109462330
SVG10022
JavaScript10013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.71
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png57.09KB15.56KB▼ 72.75%
assets/icon-256x256.png29.02KB8.96KB▼ 69.10%
assets/icon-128x128.png11.38KB4.25KB▼ 62.68%