83% dd-lastviewed

Code Review | DD Last Viewed

WordPress plugin DD Last Viewed scored 83% from 54 tests.

About plugin

  • Plugin page: dd-lastviewed
  • Plugin version: 6.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.5.3
  • WordPress version: 6.3.1
  • First release: Jun 5, 2013
  • Latest release: Nov 17, 2020
  • Number of updates: 102
  • Update frequency: every 26.7 days
  • Top authors: Mosterd3d (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

700+ active / 19,925 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.47ms] Passed 4 tests

A check of server-side resources used by DD Last Viewed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.39 ▲3.68
Dashboard /wp-admin3.33 ▲0.0345.03 ▼2.43
Posts /wp-admin/edit.php3.45 ▲0.0946.20 ▲3.05
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.49 ▼1.60
Media Library /wp-admin/upload.php3.25 ▲0.0332.45 ▼0.92

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

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

Browser metrics Passed 4 tests

DD Last Viewed: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲15114.00 ▼0.375.16 ▲3.2643.70 ▼2.10
Dashboard /wp-admin2,209 ▲214.91 ▼0.17102.86 ▼17.3341.00 ▼6.49
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0134.93 ▲0.0937.94 ▲1.17
Add New Post /wp-admin/post-new.php1,514 ▼1917.55 ▼5.37674.91 ▼6.3749.83 ▼7.39
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.1097.52 ▲0.1642.23 ▲0.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_dd_last_viewed
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dd-lastviewed/dd_templates/form.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dd-lastviewed/last-viewed.php:30
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/dd-lastviewed/dd_templates/lastviewed-widget.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 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
  • Screenshots: No descriptions were found for these screenshots #1, #2 in dd-lastviewed/assets to your readme.txt
You can take inspiration from this readme.txt

dd-lastviewed/last-viewed.php 92% from 13 tests

The entry point to "DD Last Viewed" version 6.2.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dd-lastviewed.php" instead of "last-viewed.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 detected1,691 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP3118168857
PO File6192210646
JavaScript52613150
SVG10036
CSS2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity91.00
▷ Minimum class complexity91.00
▷ Maximum class complexity91.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin