78% post-view-count-and-backend-display

Code Review | Post View Count And Backend Display

WordPress plugin Post View Count And Backend Display scored78%from 54 tests.

About plugin

  • Plugin page: post-view-count-a...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Jan 10, 2022
  • Latest release: Feb 8, 2022
  • Number of updates: 3
  • Update frequency: every 14.0 days
  • Top authors: sgsoftwaresolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /611 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.39ms] Passed 4 tests

A check of server-side resources used by Post View Count And Backend Display
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0643.77 ▼4.16
Dashboard /wp-admin3.36 ▲0.0149.73 ▼18.30
Posts /wp-admin/edit.php3.48 ▲0.1154.00 ▲0.28
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.19 ▼18.61
Media Library /wp-admin/upload.php3.28 ▲0.0537.24 ▼0.49

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Post View Count And Backend Display
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.78 ▼0.607.82 ▲5.6440.00 ▼7.91
Dashboard /wp-admin2,196 ▲195.62 ▼0.0492.09 ▼11.8739.50 ▼4.36
Posts /wp-admin/edit.php2,111 ▲111.97 ▲0.0336.41 ▼4.2334.23 ▼3.88
Add New Post /wp-admin/post-new.php1,530 ▲423.72 ▲0.72716.62 ▲20.5248.21 ▼3.33
Media Library /wp-admin/upload.php1,404 ▲74.30 ▲0.14100.17 ▼1.5142.38 ▼0.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/post-view-count-and-backend-display/public/partials/sg-post-view-count-public-display.php
    • > /wp-content/plugins/post-view-count-and-backend-display/admin/partials/sg-post-view-count-admin-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-view-count-and-backend-display/includes/class-sg-post-view-count-function.php:17

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === post-view-count-and-backend-display === )
You can take inspiration from this readme.txt

post-view-count-and-backend-display/sg-post-view-count.php 85% from 13 tests

The principal PHP file in "Post View Count And Backend Display" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("post-view-count-and-backend-display.php" instead of "sg-post-view-count.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin199 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13119539193
JavaScript24546
CSS2080

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin