89% wp-all-views-counter

Code Review | WP Views Counter

WordPress plugin WP Views Counter scored89%from 54 tests.

About plugin

  • Plugin page: wp-all-views-counter
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2016
  • Latest release: Nov 19, 2016
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: sergpost3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,015 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.07MB] [CPU: ▼4.75ms] Passed 4 tests

This is a short check of server-side resources used by WP Views Counter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0742.96 ▼0.73
Dashboard /wp-admin3.37 ▲0.0750.37 ▼3.45
Posts /wp-admin/edit.php3.49 ▲0.1347.78 ▼2.57
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.92 ▼12.25
Media Library /wp-admin/upload.php3.30 ▲0.0636.77 ▲1.06
Page Views /wp-admin/options-general.php?page=page-views3.2733.29

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_widget_viewed_posts
widget_recent-comments
views_counter_data
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Views Counter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.33 ▼0.281.63 ▼0.2341.68 ▼4.68
Dashboard /wp-admin2,193 ▲165.65 ▼0.0587.72 ▼5.0538.37 ▼1.28
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0240.45 ▲5.3336.10 ▼0.88
Add New Post /wp-admin/post-new.php1,529 ▼023.22 ▲0.18685.50 ▲52.8054.52 ▲0.56
Media Library /wp-admin/upload.php1,398 ▼24.12 ▼0.10101.74 ▼10.9646.48 ▲0.81
Page Views /wp-admin/options-general.php?page=page-views8581.9925.7925.10

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
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_widget_viewed_posts
    • views_counter_data
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === wp-all-views-counter === )
Please take inspiration from this readme.txt

wp-all-views-counter/views-counter.php 85% from 13 tests

The principal PHP file in "WP Views Counter" v. 1.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-all-views-counter.php" instead of "views-counter.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin416 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP76210291
PO File33466125

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.67
▷ Minimum class complexity4.00
▷ Maximum class complexity16.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods1477.78%
▷ Public methods1372.22%
▷ Protected methods00.00%
▷ Private methods527.78%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin