83% awesome-visitor-counter

Code Review | Awesome Visitor Counter

WordPress plugin Awesome Visitor Counter scored 83% from 54 tests.

About plugin

  • Plugin page: awesome-visitor-c...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 5.8.1
  • First release: Mar 26, 2017
  • Latest release: Jun 16, 2019
  • Number of updates: 11
  • Update frequency: every 73.6 days
  • Top authors: raihancse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active / 10,209 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼141.24ms] Passed 4 tests

An overview of server-side resources used by Awesome Visitor Counter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1330.98 ▲6.93
Dashboard /wp-admin3.07 ▲0.0248.97 ▲4.43
Posts /wp-admin/edit.php3.12 ▲0.0242.37 ▼0.23
Add New Post /wp-admin/post-new.php5.43 ▼0.0087.39 ▼568.87
Media Library /wp-admin/upload.php3.02 ▲0.0133.45 ▼0.29

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: 1 new table, 2 new options
New tables
wp_vcp_log
New WordPress options
widget_vistorcounterplugin_widget
vcp_db_version

Browser metrics Passed 4 tests

A check of browser resources used by Awesome Visitor Counter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,772 ▲17616.13 ▲0.648.82 ▼0.5253.53 ▲10.81
Dashboard /wp-admin2,982 ▲485.92 ▲0.00142.21 ▼1.61108.28 ▲3.25
Posts /wp-admin/edit.php2,777 ▲382.69 ▲0.0173.74 ▲7.4893.98 ▲6.71
Add New Post /wp-admin/post-new.php1,624 ▼4821.50 ▲2.74272.37 ▼99.39118.01 ▲13.76
Media Library /wp-admin/upload.php1,844 ▲375.03 ▼0.01138.05 ▼27.49103.68 ▼9.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_vistorcounterplugin_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/awesome-visitor-counter/index.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #2 (This is the second screen shot)
  • Plugin Name: Please specify the plugin name on the first line ( === awesome-visitor-counter === )
Please take inspiration from this readme.txt

awesome-visitor-counter/index.php 92% from 13 tests

The main PHP script in "Awesome Visitor Counter" version 2.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("awesome-visitor-counter.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin170 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16216170

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin