64% wp-limit-post-views

Code Review | WP Limit Post Views

WordPress plugin WP Limit Post Views scored 64% from 54 tests.

About plugin

  • Plugin page: wp-limit-post-views
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2017
  • Latest release: Mar 20, 2023
  • Number of updates: 16
  • Update frequency: every 125.4 days
  • Top authors: mmaennche (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,443 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.89MB] [CPU: ▼36.80ms] Passed 4 tests

Analyzing server-side resources used by WP Limit Post Views
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0745.48 ▼6.41
Dashboard /wp-admin3.05 ▼0.2526.83 ▼25.64
Posts /wp-admin/edit.php3.06 ▼0.3030.36 ▼42.59
Add New Post /wp-admin/post-new.php3.05 ▼2.8327.38 ▼70.46
Media Library /wp-admin/upload.php3.05 ▼0.1729.92 ▼8.51
Limit Post Views /wp-admin/options-general.php?page=wp-limit-post-views3.0632.99

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: 1 new table, 13 new options
New tables
wp_wplpv_tracking
New WordPress options
wplpv-post-view-count
wplpv-redirect-on-limit
widget_theysaidso_widget
widget_recent-posts
wplpv-use-js
can_compress_scripts
wplpv-using-pmppro
wplpv-post-view-count-unit
widget_recent-comments
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Limit Post Views
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1514.51 ▲1.252.34 ▼3.1051.34 ▲2.02
Dashboard /wp-admin2,213 ▲74.87 ▼0.92122.94 ▲23.4043.79 ▲6.66
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0543.55 ▲0.3938.28 ▼0.23
Add New Post /wp-admin/post-new.php1,538 ▲321.18 ▼2.13765.16 ▲100.8360.66 ▲8.06
Media Library /wp-admin/upload.php1,389 ▲44.23 ▼0.01121.63 ▲3.8557.34 ▲14.29
Limit Post Views /wp-admin/options-general.php?page=wp-limit-post-views8832.1530.0430.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wplpv_tracking
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wp-limit-post-views
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/options-general.php?page=wp-limit-post-views
    • > Warning in wp-admin/includes/template.php+1771
    call_user_func() expects parameter 1 to be a valid callback, function 'wplpv_settings_section_limits' not found or invalid function name
    • > GET request to /wp-admin/options-general.php?page=wp-limit-post-views
    • > Notice in wp-content/plugins/wp-limit-post-views/views/settings.php+149
    Trying to access array offset on value of type null

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: limit post views, paid membership pro

wp-limit-post-views/wp-limit-post-views.php Passed 13 tests

This is the main PHP file of "WP Limit Post Views" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
24 characters long description:
Limit Visitor Post Views

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
There were no executable files found in this plugin566 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5188140566

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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