79% last-visited-pages

Code Review | Last Visited Pages

WordPress plugin Last Visited Pages scored79%from 54 tests.

About plugin

  • Plugin page: last-visited-pages
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Apr 15, 2016
  • Latest release: Apr 15, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: kapillohakare (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /717 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.59ms] Passed 4 tests

Server-side resources used by Last Visited Pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0432.65 ▼8.93
Dashboard /wp-admin3.34 ▼0.0142.03 ▼19.57
Posts /wp-admin/edit.php3.39 ▲0.0344.22 ▼2.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.79 ▼7.35
Media Library /wp-admin/upload.php3.26 ▲0.0333.82 ▲3.41

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

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

Browser metrics Passed 4 tests

Last Visited Pages: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲16514.03 ▼0.354.91 ▲2.8738.66 ▼4.43
Dashboard /wp-admin2,206 ▲155.90 ▼0.00110.78 ▼1.1547.57 ▼2.94
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0035.25 ▼0.1429.23 ▼4.23
Add New Post /wp-admin/post-new.php1,534 ▲123.17 ▼0.07645.97 ▲19.0357.04 ▲4.25
Media Library /wp-admin/upload.php1,385 ▼04.25 ▲0.0698.50 ▼2.2342.08 ▼1.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_last_visited_frontend
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/last-visited-pages/last-visited-pages.php
  • 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/last-visited-pages/widget-last-visited.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: latest pages, last viewed, latest links

last-visited-pages/last-visited-pages.php Passed 13 tests

Analyzing the main PHP file in "Last Visited Pages" version 1.0
68 characters long description:
This plugin adds a widget for showing last pages viewed by the user.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin228 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22323136
PHP2123887
Markdown1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin