10% site-counter

Code Review | Site Counter

WordPress plugin Site Counter scored10%from 54 tests.

About plugin

  • Plugin page: site-counter
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-4.5.3
  • WordPress version: 6.3.1
  • First release: May 20, 2016
  • Latest release: Jun 22, 2016
  • Number of updates: 17
  • Update frequency: every 1.9 days
  • Top authors: Sam Williams (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,800 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5737
    Function wp_clear_scheduled_hook was called with an argument that is deprecated since version 3.0.0! This argument has changed to an array to match the behavior of the other cron functions.

Server metrics [RAM: ▼1.97MB] [CPU: ▼57.33ms] Passed 4 tests

This is a short check of server-side resources used by Site Counter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.39 ▼33.59
Dashboard /wp-admin2.05 ▼1.305.23 ▼58.58
Posts /wp-admin/edit.php2.05 ▼1.316.03 ▼44.29
Add New Post /wp-admin/post-new.php2.05 ▼3.847.05 ▼92.87
Media Library /wp-admin/upload.php2.05 ▼1.186.14 ▼29.38

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 9 new options
New WordPress options
sitecounter_start
db_upgraded
widget_recent-comments
sitecounter_cookies
widget_sitecounter_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Site Counter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲13714.81 ▲0.531.89 ▲0.2139.92 ▲0.13
Dashboard /wp-admin2,264 ▲765.90 ▲1.01108.19 ▼9.0939.58 ▼6.36
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0739.16 ▲0.7635.21 ▲1.62
Add New Post /wp-admin/post-new.php1,550 ▲3118.45 ▼4.65606.96 ▼57.4663.05 ▼2.04
Media Library /wp-admin/upload.php1,392 ▲44.29 ▲0.0793.05 ▼13.9841.76 ▼5.85
Site Counter /wp-admin/sitecounter.php260.440.0613.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function wp_clear_scheduled_hook was called with an argument that is deprecated since version 3.0.0! This argument has changed to an array to match the behavior of the other cron functions.
  • Zombie WordPress options were found after uninstall: 9 options
    • db_upgraded
    • widget_recent-posts
    • sitecounter_start
    • sitecounter_cookies
    • widget_recent-comments
    • widget_sitecounter_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/site-counter/site-counter.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/sitecounter.php
    • > Network (severe)
    wp-admin/sitecounter.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: counter, widget counter, counter visitors, widget, visitors

site-counter/site-counter.php Passed 13 tests

"Site Counter" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
137 characters long description:
Site Counter - is a simple count of visitors. It is will bring the number of visitors since the establishment of the counter on the site.

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
No dangerous file extensions were detected227 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1239149
PO File2242878

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin