10% recent-visited

Code Review | Recent visited

WordPress plugin Recent visited scored10%from 54 tests.

About plugin

  • Plugin page: recent-visited
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.6
  • WordPress version: 6.3.1
  • First release: Mar 11, 2015
  • Latest release: Jan 25, 2021
  • Number of updates: 8
  • Update frequency: every 268.4 days
  • Top authors: lpkapil (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,002 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/recent-visited/recent-visited.php+27
    Use of undefined constant showRecentVisitedPanel - assumed 'showRecentVisitedPanel' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.95MB] [CPU: ▼62.07ms] Passed 4 tests

A check of server-side resources used by Recent visited
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.424.84 ▼44.61
Dashboard /wp-admin2.11 ▼1.285.40 ▼58.82
Posts /wp-admin/edit.php2.11 ▼1.297.06 ▼49.15
Add New Post /wp-admin/post-new.php2.11 ▼3.826.06 ▼95.71
Media Library /wp-admin/upload.php2.11 ▼1.164.93 ▼32.23

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
recent_visited_post_type
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
recent_visited_range
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Recent visited
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.31 ▼0.061.67 ▲0.0141.52 ▲0.93
Dashboard /wp-admin2,210 ▲365.51 ▼0.0680.51 ▼10.9571.75 ▲25.96
Posts /wp-admin/edit.php2,118 ▲181.97 ▼0.0534.99 ▼9.3130.90 ▼8.09
Add New Post /wp-admin/post-new.php1,539 ▲823.43 ▲0.50782.49 ▲110.9169.42 ▲15.06
Media Library /wp-admin/upload.php1,409 ▲94.20 ▲0.04108.20 ▲5.6769.99 ▲26.05

Uninstaller [IO: ▲0.00MB] [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
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/recent-visited/recent-visited.php+27
    Use of undefined constant showRecentVisitedPanel - assumed 'showRecentVisitedPanel' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant showRecentVisitedPanel - assumed 'showRecentVisitedPanel' (this will throw an Error in a future version of PHP) in wp-content/plugins/recent-visited/recent-visited.php on line 27
    • > PHP Warning
      Use of undefined constant settingCheckVisited - assumed 'settingCheckVisited' (this will throw an Error in a future version of PHP) in wp-content/plugins/recent-visited/recent-visited.php on line 114
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/recent-visited/recent-visited.php:247

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: last visited items, recent visited products, recent visited, recent visited custom posts, custom posts...

recent-visited/recent-visited.php Passed 13 tests

"Recent visited" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
81 characters long description:
A plugin to display recently visisted custom post type. shortcode [VISITED_ITEMS]

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected214 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP19058158
CSS120148
JavaScript1818

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions10
▷ Named functions10100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/no-img.png3.76KB2.27KB▼ 39.54%
images/recent.png0.79KB0.67KB▼ 15.62%