52% webpage-view-count

Code Review | Webpage View Count

WordPress plugin Webpage View Count scored 52% from 54 tests.

About plugin

  • Plugin page: webpage-view-count
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Apr 1, 2021
  • Latest release: Aug 17, 2022
  • Number of updates: 15
  • Update frequency: every 33.5 days
  • Top authors: techforceglobal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 424 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
Installer ran successfully

Server metrics [RAM: ▼1.19MB] [CPU: ▼40.08ms] Passed 4 tests

Analyzing server-side resources used by Webpage View Count
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6814.29 ▼28.04
Dashboard /wp-admin2.82 ▼0.4917.16 ▼30.81
Posts /wp-admin/edit.php2.82 ▼0.5416.75 ▼31.77
Add New Post /wp-admin/post-new.php2.82 ▼3.0717.83 ▼69.69
Media Library /wp-admin/upload.php2.82 ▼0.4118.93 ▼13.64
Post View Setting /wp-admin/options-general.php?page=post-view-setting2.8217.99

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 168 new files
Database: 2 new tables, 7 new options
New tables
wp_post_views
wp_post_views_by_user
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
post_view_count_plugin_version

Browser metrics Passed 4 tests

An overview of browser requirements for Webpage View Count
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.29 ▼0.911.81 ▼0.1541.61 ▼2.18
Dashboard /wp-admin2,210 ▲225.88 ▲1.01108.34 ▼7.5939.35 ▼8.00
Posts /wp-admin/edit.php2,090 ▲12.02 ▲0.0234.64 ▼4.6933.31 ▼0.21
Add New Post /wp-admin/post-new.php1,537 ▲2323.39 ▲5.88670.48 ▼16.4368.59 ▲13.90
Media Library /wp-admin/upload.php1,386 ▼24.18 ▼0.0298.68 ▼3.0745.45 ▼0.58
Post View Setting /wp-admin/options-general.php?page=post-view-setting9822.7146.0453.07

Uninstaller [IO: ▲0.00MB] [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
    • > Notice in wp-content/plugins/webpage-view-count/class-wvcpostviews.php+83
    Trying to access array offset on value of type bool
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_post_views
    • wp_post_views_by_user
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • post_view_count_plugin_version
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-view-setting
    • > Notice in wp-content/plugins/webpage-view-count/class-wvcpostviewsetting.php+233
    Trying to access array offset on value of type bool

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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/webpage-view-count/class-wvcpostviewsetting.php:255

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=post-view-setting
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Bootstrap's tooltips require Popper (https://popper.js.org)" "TypeError: Bootstrap's tooltips require Popper (https://popper.js.org)\n at new t (/wp-content/plugins/webpage-view-count/js/bootstrap.min.js?ver=1.0:6:40739)\n at HTMLButtonElement.\u003Canonymous> (/wp-content/plugins/webpage-view-count/js/bootstrap.min.js?ver=1.0:6:49900)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:1594)\n at t._jQueryInterface [as tooltip] (/wp-content/plugins/webpage-view-count/js/bootstrap.min.js?ver=1.0:6:49774)\n at t.callback (/wp-content/plugins/webpage-view-count/editor/summernote.min.js?ver=1.0:2:149897)\n at t.value (/wp-content/plugins/webpage-view-count/editor/summernote.min.js?ver=1.0:2:2456)\n at /wp-content/plugins/webpage-view-count/editor/summernote.min.js?ver=1.0:2:2405\n at Array.forEach (\u003Canonymous>)\n at t.value (/wp-content/plugins/webpage-view-count/editor/summernote.min.js?ver=1.0:2:2382)" undefined
    • > GET request to /wp-admin/options-general.php?page=post-view-setting
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Bootstrap's tooltips require Popper (https://popper.js.org)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Contributors: Contributors not specified
The official readme.txt might help

webpage-view-count/class-wvcpostviews.php 77% from 13 tests

This is the main PHP file of "Webpage View Count" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("webpage-view-count.php" instead of "class-wvcpostviews.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin31,898 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript995,2257,39331,412
PHP252209439
CSS944347

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity27.00
▷ Minimum class complexity20.00
▷ Maximum class complexity34.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin