94% ab-post-view-counter

Code Review | AB Post View Counter

WordPress plugin AB Post View Counter scored 94% from 54 tests.

About plugin

  • Plugin page: ab-post-view-counter
  • Plugin version: 1.14
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8
  • WordPress version: 5.9.2
  • First release: Apr 24, 2017
  • Latest release: May 6, 2017
  • Number of updates: 18
  • Update frequency: every 3.1 days
  • Top authors: abjelosevic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 886 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼291.76ms] Passed 4 tests

This is a short check of server-side resources used by AB Post View Counter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.0956.96 ▲7.31
Dashboard /wp-admin3.44 ▲0.0334.15 ▲0.79
Posts /wp-admin/edit.php3.67 ▲0.0342.89 ▲6.74
Add New Post /wp-admin/post-new.php6.93 ▼0.0794.42 ▼1,176.34
Media Library /wp-admin/upload.php3.32 ▲0.0226.67 ▲1.77
AB Post View Counter /wp-admin/options-general.php?page=abpvc3.2821.75

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for AB Post View Counter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲7815.85 ▲0.155.83 ▼0.222.59 ▲0.38
Dashboard /wp-admin2,897 ▲366.25 ▲0.07116.34 ▼18.93152.01 ▼8.73
Posts /wp-admin/edit.php2,677 ▼113.23 ▼0.0164.53 ▼0.95142.16 ▼1.50
Add New Post /wp-admin/post-new.php1,713 ▲221.58 ▲0.83443.89 ▼34.14154.29 ▼3.94
Media Library /wp-admin/upload.php1,706 ▲85.52 ▼0.00140.86 ▼3.90191.38 ▲4.05
AB Post View Counter /wp-admin/options-general.php?page=abpvc1,0052.4453.05124.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ab-post-view-counter/ab-post-count-plugin.php:114

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


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: counter, post, view, page

ab-post-view-counter/ab-post-count-plugin.php 92% from 13 tests

"AB Post View Counter" version 1.14's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ab-post-view-counter.php" instead of "ab-post-count-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected84 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions8100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
There were not PNG files found in your plugin