90% mwr-hit-counter

Code Review | MWR HitCounter

WordPress plugin MWR HitCounter scored90%from 54 tests.

About plugin

  • Plugin page: mwr-hit-counter
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.14-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 27, 2019
  • Latest release: Jul 1, 2019
  • Number of updates: 8
  • Update frequency: every 0.5 days
  • Top authors: scriptsworks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,697 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by MWR HitCounter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.00 ▲0.83
Dashboard /wp-admin3.32 ▲0.0250.94 ▲0.54
Posts /wp-admin/edit.php3.38 ▲0.0249.06 ▼2.59
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.46 ▼14.85
Media Library /wp-admin/upload.php3.25 ▲0.0236.10 ▼5.46

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: 1 new table, 6 new options
New tables
wp_mwr_counter
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for MWR HitCounter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.041.77 ▲0.0645.02 ▼1.84
Dashboard /wp-admin2,195 ▲185.56 ▼0.1190.36 ▼13.0539.11 ▼5.75
Posts /wp-admin/edit.php2,100 ▼01.95 ▲0.0135.90 ▼0.4039.10 ▲2.71
Add New Post /wp-admin/post-new.php1,540 ▲1418.14 ▼4.86643.50 ▼49.2756.61 ▲2.54
Media Library /wp-admin/upload.php1,394 ▼64.24 ▲0.0496.45 ▼10.6744.40 ▼4.96

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: page counter, easy counter, counter, page view count, wordpress page view...

mwr-hit-counter/index.php 92% from 13 tests

This is the main PHP file of "MWR HitCounter" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mwr-hit-counter.php" instead of "index.php")

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

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin