68% mc-visitor-tally

Code Review | MC Visitor Tally

WordPress plugin MC Visitor Tally scored68%from 54 tests.

About plugin

  • Plugin page: mc-visitor-tally
  • Plugin version: 2.8.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 5, 2020
  • Latest release: Jun 13, 2022
  • Number of updates: 66
  • Update frequency: every 10.6 days
  • Top authors: Mike Hickcox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,205 total downloads

Benchmarks

Plugin footprint 65% 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.11MB] [CPU: ▼2.54ms] Passed 4 tests

Server-side resources used by MC Visitor Tally
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1249.36 ▲8.90
Dashboard /wp-admin3.42 ▲0.1251.14 ▲1.86
Posts /wp-admin/edit.php3.53 ▲0.1752.22 ▲3.68
Add New Post /wp-admin/post-new.php6.00 ▲0.1183.56 ▼18.19
Media Library /wp-admin/upload.php3.34 ▲0.1138.78 ▲2.48
MC Visitor Tally /wp-admin/options-general.php?page=mcvisitortally3.3134.80

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: 1 new table, 8 new options
New tables
wp_mc6397_visitor_tally
New WordPress options
widget_theysaidso_widget
mc6397vt_installed
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_mc6397vt_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for MC Visitor Tally
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,048 ▲30213.64 ▼0.731.76 ▼0.2741.87 ▼4.83
Dashboard /wp-admin2,457 ▲2754.87 ▼1.12100.22 ▼11.6739.83 ▼8.92
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0440.65 ▲0.5935.97 ▼0.09
Add New Post /wp-admin/post-new.php1,541 ▲2723.29 ▲5.82684.89 ▲27.6752.47 ▼3.47
Media Library /wp-admin/upload.php1,389 ▼24.25 ▲0.12110.23 ▲7.9047.01 ▲0.86
MC Visitor Tally /wp-admin/options-general.php?page=mcvisitortally9902.0524.5128.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/mc-visitor-tally/uninstall.php+9
    Use of undefined constant No - assumed 'No' (this will throw an Error in a future version of PHP)
  • 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 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mc-visitor-tally/mc-visitor-tally.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mc-visitor-tally/inc/mc6397vt_settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/mc-visitor-tally/inc/mc6397vt_shortcode.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mc-visitor-tally/inc/mc6397vt_dashboard-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mc-visitor-tally/inc/mc6397vt_widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4, #5, #6 in mc-visitor-tally/assets to your readme.txt
The official readme.txt might help

mc-visitor-tally/mc-visitor-tally.php Passed 13 tests

The principal PHP file in "MC Visitor Tally" v. 2.8.3 is loaded by WordPress automatically on each request
123 characters long description:
Counts unique daily visits and displays in various timeframes: Today, Yesterday, Current Week, Current Month, Current Year.

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
Success! There were no dangerous files found in this plugin541 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP711342541

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity9.00
▷ Minimum class complexity7.00
▷ Maximum class complexity11.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin