94% abwp-simple-counter

Code Review | Simple Counter

WordPress plugin Simple Counter scored 94% from 54 tests.

About plugin

  • Plugin page: abwp-simple-counter
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.9
  • WordPress version: 5.9.2
  • First release: Mar 25, 2019
  • Latest release: Jan 25, 2022
  • Number of updates: 14
  • Update frequency: every 74.3 days
  • Top authors: abwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active / 3,862 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Server-side resources used by Simple Counter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0658.22 ▲7.84
Dashboard /wp-admin3.45 ▲0.0532.67 ▼1.05
Posts /wp-admin/edit.php3.68 ▲0.0437.39 ▼0.43
Add New Post /wp-admin/post-new.php6.92 ▼0.0590.58 ▼1,166.83
Media Library /wp-admin/upload.php3.33 ▲0.0423.78 ▲1.09
Simple Counter /wp-admin/options-general.php?page=simple-counter3.3623.84

Server storage [IO: ▲0.04MB] [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: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Counter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲7315.83 ▲0.157.23 ▲1.342.90 ▲0.54
Dashboard /wp-admin2,897 ▲366.16 ▲0.00116.31 ▼24.55153.09 ▼20.43
Posts /wp-admin/edit.php2,696 ▲23.24 ▲0.0163.12 ▼4.16140.51 ▼5.14
Add New Post /wp-admin/post-new.php1,693 ▲2521.12 ▲1.91439.49 ▲16.86158.57 ▼0.53
Media Library /wp-admin/upload.php1,703 ▲85.48 ▼0.07140.34 ▼8.77188.68 ▲0.17
Simple Counter /wp-admin/options-general.php?page=simple-counter1,2832.3855.61159.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/abwp-simple-counter/simple-counter.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/abwp-simple-counter/includes/page-admin-counters.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


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
7 plugin tags: tools, yandex, metrika, google, statistics...

abwp-simple-counter/simple-counter.php 92% from 13 tests

The entry point to "Simple Counter" version 1.0.2 is a PHP file that has certain tags in its header comment area
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 ("abwp-simple-counter.php" instead of "simple-counter.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 detected373 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File1293198

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity14.00
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin