84% view-post-counter

Code Review | View Post counter

WordPress plugin View Post counter scored84%from 54 tests.

About plugin

  • Plugin page: view-post-counter
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Nov 14, 2013
  • Latest release: Jul 3, 2015
  • Number of updates: 17
  • Update frequency: every 35.2 days
  • Top authors: masumbd (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /7,635 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by View Post counter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.24 ▲1.02
Dashboard /wp-admin3.32 ▲0.0164.25 ▲16.38
Posts /wp-admin/edit.php3.37 ▲0.0146.66 ▼3.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.67 ▼17.99
Media Library /wp-admin/upload.php3.24 ▲0.0134.67 ▲1.03

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

View Post counter: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.371.75 ▲0.1042.05 ▼3.26
Dashboard /wp-admin2,203 ▲184.85 ▼0.02110.68 ▲6.5940.70 ▼1.77
Posts /wp-admin/edit.php2,101 ▲92.00 ▼0.0639.77 ▼6.3034.50 ▼2.94
Add New Post /wp-admin/post-new.php1,514 ▼2123.35 ▲0.30621.12 ▲10.1055.93 ▲6.09
Media Library /wp-admin/upload.php1,382 ▼04.17 ▼0.0097.49 ▼5.5043.31 ▼0.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/view-post-counter/view-post-counter.php:79

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.jpg.), #2 (screenshot-2.jpg)
You can look at the official readme.txt

view-post-counter/view-post-counter.php Passed 13 tests

The primary PHP file in "View Post counter" version 1.1 is used by WordPress to initiate all plugin functionality
47 characters long description:
This is very simple plugin of view post counter

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected36 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1143536

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin