84% ab-post-view-counter

Code Review | AB Post View Counter

WordPress plugin AB Post View Counter scored 84% 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: 6.3.1
  • 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 / 1,096 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by AB Post View Counter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.56 ▲2.55
Dashboard /wp-admin3.32 ▲0.0246.63 ▼3.40
Posts /wp-admin/edit.php3.37 ▲0.0248.98 ▼0.97
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.16 ▼2.84
Media Library /wp-admin/upload.php3.24 ▲0.0135.36 ▲0.31
AB Post View Counter /wp-admin/options-general.php?page=abpvc3.2130.38

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for AB Post View Counter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.32 ▼0.911.58 ▼0.0840.44 ▼8.53
Dashboard /wp-admin2,210 ▲245.86 ▲0.90107.07 ▼10.0242.06 ▲1.77
Posts /wp-admin/edit.php2,103 ▲112.01 ▼0.0040.50 ▲1.8934.55 ▼1.92
Add New Post /wp-admin/post-new.php1,537 ▲423.36 ▲0.28605.80 ▼81.6562.86 ▲8.87
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.0197.02 ▼6.6541.89 ▼5.15
AB Post View Counter /wp-admin/options-general.php?page=abpvc7962.0322.7126.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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 a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: post, view, counter, page

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

The primary PHP file in "AB Post View Counter" version 1.14 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin84 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1251384

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems 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
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
No PNG files were detected