10% ab-last-viewed

Code Review | AB Last Viewed

WordPress plugin AB Last Viewed scored10%from 54 tests.

About plugin

  • Plugin page: ab-last-viewed
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2014
  • Latest release: Mar 7, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: endrix.develop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /986 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/ab-last-viewed/ab-last-viewed.php+111
    Methods with the same name as their class will not be constructors in a future version of PHP; AB_Last_Read has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼56.90ms] Passed 4 tests

A check of server-side resources used by AB Last Viewed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.397.09 ▼32.15
Dashboard /wp-admin2.10 ▼1.215.69 ▼51.86
Posts /wp-admin/edit.php2.10 ▼1.267.67 ▼43.99
Add New Post /wp-admin/post-new.php2.10 ▼3.795.64 ▼99.60
Media Library /wp-admin/upload.php2.10 ▼1.136.11 ▼28.55

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_ab_last_read

Browser metrics Passed 4 tests

An overview of browser requirements for AB Last Viewed
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▲0.142.54 ▲0.9162.30 ▲17.21
Dashboard /wp-admin2,195 ▲155.62 ▼0.0591.48 ▲0.0242.35 ▲2.92
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0235.72 ▼3.7734.92 ▲2.46
Add New Post /wp-admin/post-new.php1,549 ▲2323.24 ▲5.59686.00 ▼0.3161.42 ▲2.71
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.0099.30 ▼10.7348.09 ▲0.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/ab-last-viewed/ab-last-viewed.php+111
    Methods with the same name as their class will not be constructors in a future version of PHP; AB_Last_Read has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_ab_last_read
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • 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
Good news, no errors were detected

SRP 50% 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ab-last-viewed/ab-last-viewed.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Appereance in the right side-bar of Twentyfourteen theme)
You can look at the official readme.txt

ab-last-viewed/ab-last-viewed.php Passed 13 tests

The principal PHP file in "AB Last Viewed" v. 0.1 is loaded by WordPress automatically on each request
61 characters long description:
This plugin adds a widget that shows the last five post read.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin108 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1177488
PO File12220

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin