84% dexs-counter

Code Review | Dexs.Counter

WordPress plugin Dexs.Counter scored84%from 54 tests.

About plugin

  • Plugin page: dexs-counter
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Dec 11, 2016
  • Latest release: Dec 15, 2016
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: SamBrishes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /968 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼2.66ms] Passed 4 tests

A check of server-side resources used by Dexs.Counter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2639.31 ▼0.57
Dashboard /wp-admin3.58 ▲0.2751.62 ▲5.24
Posts /wp-admin/edit.php3.67 ▲0.3245.94 ▼4.65
Add New Post /wp-admin/post-new.php6.14 ▲0.2685.71 ▼8.22
Media Library /wp-admin/upload.php3.48 ▲0.2638.26 ▲2.80
Dexs Counter /wp-admin/options-general.php?page=dexs-counter3.4937.76

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: 2 new tables, 8 new options
New tables
wp_dexs_counter
wp_dexs_counter_stats
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_dexs-rate-counter
theysaidso_admin_options
widget_recent-posts
widget_dexs-view-counter
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Dexs.Counter: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲14114.03 ▼0.261.81 ▼0.2739.46 ▼5.06
Dashboard /wp-admin2,282 ▲945.41 ▲0.30111.19 ▲6.9546.39 ▲4.26
Posts /wp-admin/edit.php2,093 ▲12.01 ▲0.0134.17 ▼7.8135.42 ▼1.19
Add New Post /wp-admin/post-new.php1,517 ▲317.49 ▼0.07687.42 ▼10.7064.79 ▲11.89
Media Library /wp-admin/upload.php1,395 ▲74.19 ▲0.0195.19 ▼11.0440.39 ▼6.93
Dexs Counter /wp-admin/options-general.php?page=dexs-counter1,0902.0322.4644.91

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
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • widget_dexs-rate-counter
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_dexs-view-counter
    • widget_recent-posts
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/dexs-counter/system/admin.docs.php
    • > /wp-content/plugins/dexs-counter/system/admin.widget.php
    • > /wp-content/plugins/dexs-counter/system/admin.config.php
    • > /wp-content/plugins/dexs-counter/system/func.frontend.php
    • > /wp-content/plugins/dexs-counter/system/class.widgets.php
    • > /wp-content/plugins/dexs-counter/system/class.system.php
    • > /wp-content/plugins/dexs-counter/dexs-counter.php
    • > /wp-content/plugins/dexs-counter/system/class.counter.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: views, statistics, rating, widget, ratings...

dexs-counter/dexs-counter.php Passed 13 tests

The entry point to "Dexs.Counter" version 0.1.3 is a PHP file that has certain tags in its header comment area
119 characters long description:
A simple but powerful view counter and rating system, with own (dashboard) widgets, for your awesome WordPress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,619 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP91913491,831
CSS2528545
PO File16473162
JavaScript211881

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity61.00
▷ Minimum class complexity34.00
▷ Maximum class complexity115.00
Average method complexity7.56
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods2259.46%
▷ Protected methods00.00%
▷ Private methods1540.54%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin