83% user-specific-posts

Code Review | User Specific Posts

WordPress plugin User Specific Posts scored83%from 54 tests.

About plugin

  • Plugin page: user-specific-posts
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2023
  • Latest release: Sep 3, 2023
  • Number of updates: 8
  • Update frequency: every 28.5 days
  • Top authors: iworksolo (62.5%)mansurahamed (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /268 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.39ms] Passed 4 tests

A check of server-side resources used by User Specific Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.82 ▼0.47
Dashboard /wp-admin3.33 ▲0.0250.97 ▼0.15
Posts /wp-admin/edit.php3.38 ▲0.0250.64 ▼0.50
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.99 ▼15.40
Media Library /wp-admin/upload.php3.25 ▲0.0238.18 ▼1.19

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/user-specific-posts/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for User Specific Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.29 ▼1.082.00 ▲0.1243.83 ▲1.55
Dashboard /wp-admin2,221 ▲185.83 ▼0.0796.86 ▼5.0343.73 ▼4.26
Posts /wp-admin/edit.php2,097 ▼32.04 ▲0.0334.68 ▼4.8136.93 ▼5.78
Add New Post /wp-admin/post-new.php6,237 ▲4,70619.44 ▼3.80931.70 ▲275.0251.61 ▼3.93
Media Library /wp-admin/upload.php1,403 ▲64.25 ▼0.01106.54 ▲2.4048.02 ▲2.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-specific-posts/user_specific_posts.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 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
3 plugin tags: user posts, post restriction, specific user

user-specific-posts/user_specific_posts.php 85% from 13 tests

The principal PHP file in "User Specific Posts" v. 1.0.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 171 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("user-specific-posts.php" instead of "user_specific_posts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin114 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13249114

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin