84% wp-stats-view-counter

Code Review | WordPress Stats View Counter

WordPress plugin WordPress Stats View Counter scored84%from 54 tests.

About plugin

  • Plugin page: wp-stats-view-cou...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2012
  • Latest release: Oct 6, 2015
  • Number of updates: 12
  • Update frequency: every 85.1 days
  • Top authors: AdamCapriola (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /24,583 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.37ms] Passed 4 tests

Server-side resources used by WordPress Stats View Counter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.18 ▼4.54
Dashboard /wp-admin3.34 ▼0.0045.09 ▼14.87
Posts /wp-admin/edit.php3.39 ▲0.0445.61 ▼1.84
Add New Post /wp-admin/post-new.php5.92 ▲0.0488.21 ▼8.22
Media Library /wp-admin/upload.php3.26 ▲0.0433.40 ▲0.62
View Counter /wp-admin/options-general.php?page=wp_stats_view_counter3.2330.21

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Stats View Counter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.30 ▼1.291.64 ▼0.3638.31 ▼1.48
Dashboard /wp-admin2,210 ▲195.84 ▼0.0697.44 ▼6.3737.63 ▼5.90
Posts /wp-admin/edit.php2,090 ▲12.05 ▲0.0139.28 ▲5.5835.40 ▲0.62
Add New Post /wp-admin/post-new.php1,536 ▲1723.23 ▼0.06606.95 ▼30.6448.26 ▼13.96
Media Library /wp-admin/upload.php1,392 ▲104.19 ▲0.0092.35 ▼6.6244.73 ▼2.89
View Counter /wp-admin/options-general.php?page=wp_stats_view_counter7592.0225.1725.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just 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/wp-stats-view-counter/plugin.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Settings)
You can take inspiration from this readme.txt

wp-stats-view-counter/plugin.php 92% from 13 tests

"WordPress Stats View Counter" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-stats-view-counter.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected163 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15364126
PO File14131,06537

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.54KB5.04KB▼ 67.58%