84% unread-posts

Code Review | Unread Posts

WordPress plugin Unread Posts scored 84% from 54 tests.

About plugin

  • Plugin page: unread-posts
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.2
  • WordPress version: 6.3.1
  • First release: May 8, 2015
  • Latest release: Oct 14, 2015
  • Number of updates: 5
  • Update frequency: every 31.8 days
  • Top authors: danielpataki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼3.18ms] Passed 4 tests

This is a short check of server-side resources used by Unread Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.12 ▼0.83
Dashboard /wp-admin3.41 ▲0.1145.72 ▼2.02
Posts /wp-admin/edit.php3.53 ▲0.1745.40 ▼2.31
Add New Post /wp-admin/post-new.php5.99 ▲0.1195.90 ▼4.15
Media Library /wp-admin/upload.php3.34 ▲0.1133.49 ▼4.24
Unread Posts /wp-admin/options-general.php?page=unread-posts-settings3.3132.47

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_up-unread-posts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Unread Posts: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.13 ▼1.295.00 ▲3.1843.52 ▲5.56
Dashboard /wp-admin2,204 ▲154.87 ▼0.1096.05 ▼18.1939.25 ▼2.49
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0333.57 ▼7.4334.69 ▼0.90
Add New Post /wp-admin/post-new.php1,517 ▼1817.57 ▼5.75646.94 ▼51.8258.76 ▼10.63
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0396.43 ▼12.2741.17 ▼5.88
Unread Posts /wp-admin/options-general.php?page=unread-posts-settings1,1402.3032.0626.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_up-unread-posts
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'UP_Unread_Posts_Handler' not found in wp-content/plugins/unread-posts/classes/class-up-unread-posts-handler-db.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/unread-posts/classes/class-up-unread-posts-widget.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/unread-posts/classes/class-up-unread-posts-widget.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'UP_Unread_Posts_Handler' not found in wp-content/plugins/unread-posts/classes/class-up-unread-posts-handler-cookie.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: posts, widget, related

unread-posts/unead-posts.php 92% from 13 tests

Analyzing the main PHP file in "Unread Posts" version 1.0.3
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("unread-posts.php" instead of "unead-posts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin585 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP7170534421
CSS2271788
PO File1202453
JavaScript28423

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.28
Average class complexity8.83
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods35
▷ Static methods38.57%
▷ Public methods3291.43%
▷ Protected methods38.57%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected