90% custom-viewer-count-widget

Code Review | Custom Viewer Count Widget

WordPress plugin Custom Viewer Count Widget scored90%from 54 tests.

About plugin

  • Plugin page: custom-viewer-cou...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 30, 2022
  • Latest release: Jan 11, 2023
  • Number of updates: 8
  • Update frequency: every 1.6 days
  • Top authors: cdesksolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Custom Viewer Count Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.59 ▼3.03
Dashboard /wp-admin3.33 ▲0.0249.68 ▲4.12
Posts /wp-admin/edit.php3.38 ▲0.0251.94 ▲3.64
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.77 ▲3.14
Media Library /wp-admin/upload.php3.25 ▲0.0233.12 ▼2.75
Custom Viewer Count Widget /wp-admin/options-general.php?page=wccvcw3.2231.19

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Viewer Count Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.30 ▼1.131.93 ▼0.1643.05 ▼4.10
Dashboard /wp-admin2,210 ▲195.85 ▲0.98106.49 ▲1.7142.05 ▼0.66
Posts /wp-admin/edit.php2,093 ▲12.04 ▲0.0139.47 ▼3.3834.92 ▼5.47
Add New Post /wp-admin/post-new.php1,545 ▲318.44 ▲0.11602.53 ▼61.8853.63 ▼3.61
Media Library /wp-admin/upload.php1,386 ▼24.24 ▼0.0898.44 ▼9.0044.01 ▼1.00
Custom Viewer Count Widget /wp-admin/options-general.php?page=wccvcw8042.0624.3226.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: social-proof, urgency

custom-viewer-count-widget/Custom Viewer Count Widget.php 92% from 13 tests

The main PHP file in "Custom Viewer Count Widget" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-viewer-count-widget.php" instead of "Custom Viewer Count Widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected111 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1319111

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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