90% user-posts-limit

Code Review | User Posts Limit

WordPress plugin User Posts Limit scored90%from 54 tests.

About plugin

  • Plugin page: user-posts-limit
  • Plugin version: 1.1.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Apr 22, 2020
  • Latest release: Oct 22, 2023
  • Number of updates: 41
  • Update frequency: every 31.2 days
  • Top authors: condless (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /13,663 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by User Posts Limit
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.76 ▼5.41
Dashboard /wp-admin3.35 ▲0.0145.75 ▼8.54
Posts /wp-admin/edit.php3.40 ▲0.0462.00 ▲14.60
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.54 ▼9.46
Media Library /wp-admin/upload.php3.27 ▲0.0435.47 ▲0.99
User Posts Limit /wp-admin/options-general.php?page=user-posts-limit3.2629.77

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 15 new options
New WordPress options
upl_posts_type
can_compress_scripts
theysaidso_admin_options
upl_priority
db_upgraded
upl_num_limit
widget_theysaidso_widget
upl_user_role
widget_recent-posts
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by User Posts Limit
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲4014.44 ▼0.291.76 ▼0.1644.11 ▲1.89
Dashboard /wp-admin2,229 ▲525.61 ▼0.0792.39 ▼10.5241.43 ▼1.94
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0052.11 ▲17.2152.32 ▲18.09
Add New Post /wp-admin/post-new.php1,536 ▲1023.29 ▼0.50638.23 ▼62.1349.97 ▼5.95
Media Library /wp-admin/upload.php1,401 ▼24.20 ▼0.0896.62 ▼5.3342.19 ▼0.05
User Posts Limit /wp-admin/options-general.php?page=user-posts-limit1,1211.9921.0428.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 15 options in the database
    • upl_manage_cap
    • widget_recent-posts
    • can_compress_scripts
    • upl_priority
    • upl_posts_type
    • upl_period
    • widget_theysaidso_widget
    • upl_message
    • upl_notice
    • widget_recent-comments
    • ...

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need your attention: The official readme.txt might help

user-posts-limit/user-posts-limit.php Passed 13 tests

"User Posts Limit" version 1.1.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
57 characters long description:
Limit the number of posts user can create. Any post type.

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
Everything looks great! No dangerous files found in this plugin637 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP135157579
PO File1161958

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity186.00
▷ Minimum class complexity186.00
▷ Maximum class complexity186.00
Average method complexity5.41
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin