10% ab-last-viewed

Code Review | AB Last Viewed

WordPress plugin AB Last Viewed scored 10% 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: 5.9.2
  • 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 / 832 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
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > 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: ▼2.48MB] [CPU: ▼351.21ms] Passed 4 tests

A check of server-side resources used by AB Last Viewed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼1.634.13 ▼46.78
Dashboard /wp-admin1.91 ▼1.503.61 ▼31.20
Posts /wp-admin/edit.php1.91 ▼1.734.91 ▼37.63
Add New Post /wp-admin/post-new.php1.91 ▼5.064.31 ▼1,289.21
Media Library /wp-admin/upload.php1.91 ▼1.393.38 ▼21.91

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
widget_ab_last_read

Browser metrics Passed 4 tests

Checking browser requirements for AB Last Viewed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2915.89 ▲0.155.93 ▼0.342.31 ▼0.73
Dashboard /wp-admin2,895 ▲406.08 ▼0.11116.02 ▼23.49156.36 ▼11.82
Posts /wp-admin/edit.php2,694 ▼03.24 ▲0.0163.62 ▲2.64137.02 ▼4.98
Add New Post /wp-admin/post-new.php1,661 ▼9716.52 ▼5.43430.68 ▼3.58155.69 ▼5.90
Media Library /wp-admin/upload.php1,698 ▲35.47 ▼0.04134.05 ▼2.34182.50 ▼3.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall 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
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_ab_last_read

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > 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 a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Appereance in the right side-bar of Twentyfourteen theme)
You can take inspiration from this readme.txt

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

The main PHP script in "AB Last Viewed" version 0.1 is automatically included on every request by WordPress
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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected108 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1177488
PO File12220

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
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
There were not PNG files found in your plugin