68% countera

Code Review | Countera

WordPress plugin Countera scored68%from 54 tests.

About plugin

  • Plugin page: countera
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8
  • WordPress version: 6.3.1
  • First release: Jul 24, 2021
  • Latest release: Jul 24, 2021
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: extendmate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /299 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼3.02ms] Passed 4 tests

Analyzing server-side resources used by Countera
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1739.76 ▼0.52
Dashboard /wp-admin3.47 ▲0.1748.39 ▲1.35
Posts /wp-admin/edit.php3.58 ▲0.2345.54 ▲0.14
Add New Post /wp-admin/post-new.php6.05 ▲0.1681.92 ▼11.55
Media Library /wp-admin/upload.php3.39 ▲0.1637.29 ▼0.15
Count Post Views /wp-admin/users.php?page=countera-count-post-views3.4631.25

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 50 new files
Database: 1 new table, 6 new options
New tables
wp_countera_post_view_count
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Countera: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3314.75 ▲0.511.87 ▼0.0443.64 ▲4.14
Dashboard /wp-admin2,213 ▲275.04 ▲0.11100.13 ▼6.0739.16 ▼2.88
Posts /wp-admin/edit.php2,090 ▼21.98 ▼0.0838.29 ▼2.6135.48 ▲2.39
Add New Post /wp-admin/post-new.php1,546 ▲1323.15 ▼0.10669.01 ▼9.1353.21 ▼6.41
Media Library /wp-admin/upload.php1,389 ▼24.23 ▼0.0696.71 ▼2.5742.78 ▼3.44
Count Post Views /wp-admin/users.php?page=countera-count-post-views1,5333.3965.9761.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_countera_post_view_count
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/countera/inc/frontend/views/default.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/countera/inc/admin/views/tables/listing.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/countera/inc/admin/views/layouts/default.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/countera/inc/admin/views/forms/listing.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/countera/inc/admin/views/listing.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/countera/inc/admin/views/forms/filter.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (The listing table for backend.) image required
You can take inspiration from this readme.txt

countera/countera.php Passed 13 tests

The entry point to "Countera" version 1.0.0 is a PHP file that has certain tags in its header comment area
39 characters long description:
Count any post views per user per date.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected10,332 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
CSS71,217139,213
PHP17197445656
JavaScript112864463

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.75
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods42
▷ Static methods37.14%
▷ Public methods2661.90%
▷ Protected methods00.00%
▷ Private methods1638.10%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin