78% everest-counter-lite

Code Review | Beautiful Stat Counter Plugin for WordPress - Everest Counter Lite

WordPress plugin Beautiful Stat Counter Plugin for WordPress - Everest Counter Lite scored 78% from 54 tests.

About plugin

  • Plugin page: everest-counter-lite
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 5.9.2
  • First release: Aug 13, 2017
  • Latest release: Nov 10, 2021
  • Number of updates: 26
  • Update frequency: every 59.7 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active / 23,850 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 gracefully, with no errors

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

Server-side resources used by Beautiful Stat Counter Plugin for WordPress - Everest Counter Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3257.46 ▲8.26
Dashboard /wp-admin3.71 ▲0.3039.31 ▲7.35
Posts /wp-admin/edit.php3.94 ▲0.3045.70 ▲9.73
Add New Post /wp-admin/post-new.php7.14 ▲0.1796.72 ▼1,186.47
Media Library /wp-admin/upload.php3.58 ▲0.2825.51 ▲1.14
More WordPress Stuff /wp-admin/edit.php?post_type=everest-counter&page=about-us3.6027.97
All Everest Counter /wp-admin/edit.php?post_type=everest-counter3.7131.69
Add New Everest Counter /wp-admin/post-new.php?post_type=everest-counter4.1355.08

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 59 new files
Database: no new tables, 1 new option
New WordPress options
widget_ec_widget

Browser metrics Passed 4 tests

Beautiful Stat Counter Plugin for WordPress - Everest Counter Lite: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,229 ▲48518.29 ▲2.729.18 ▲3.402.07 ▼0.14
Dashboard /wp-admin3,190 ▲3297.84 ▲1.54148.63 ▲15.81142.42 ▼23.06
Posts /wp-admin/edit.php3,022 ▲3315.41 ▲2.1785.96 ▲21.26135.91 ▼6.25
Add New Post /wp-admin/post-new.php1,747 ▲8617.40 ▲0.24405.90 ▼9.96153.41 ▼6.99
Media Library /wp-admin/upload.php1,801 ▲1006.33 ▲0.82111.64 ▼31.12181.11 ▼3.88
More WordPress Stuff /wp-admin/edit.php?post_type=everest-counter&page=about-us1,92112.31244.60198.53
All Everest Counter /wp-admin/edit.php?post_type=everest-counter1,7195.1583.19102.99
Add New Everest Counter /wp-admin/post-new.php?post_type=everest-counter18,3106.72205.22166.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_ec_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 17× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/everest-counter-lite/inc/frontend/ec-shortcode.php
    • > /wp-content/plugins/everest-counter-lite/inc/frontend/templates/parts/feature-item.php
    • > /wp-content/plugins/everest-counter-lite/everest-counter-lite.php
    • > /wp-content/plugins/everest-counter-lite/inc/backend/meta-boxes/add_items.php
    • > /wp-content/plugins/everest-counter-lite/inc/backend/register-post-type-and-meta-boxes.php
    • > /wp-content/plugins/everest-counter-lite/inc/frontend/templates/common-template.php
    • > /wp-content/plugins/everest-counter-lite/inc/backend/widget.php
    • > /wp-content/plugins/everest-counter-lite/inc/backend/meta-boxes/item.php
    • > /wp-content/plugins/everest-counter-lite/inc/frontend/templates/parts/overlay.php
    • > /wp-content/plugins/everest-counter-lite/inc/frontend/templates/parts/count.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/everest-counter-lite/inc/ecl-block/ecl-block-init.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/everest-counter-lite/inc/plugin_variables.php:654

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 Passed 29 tests

readme.txt Passed 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
8 plugin tags: stats, number, stats counter, counterup, stat counter...

everest-counter-lite/everest-counter-lite.php Passed 13 tests

"Beautiful Stat Counter Plugin for WordPress - Everest Counter Lite" version 2.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
90 characters long description:
A plugin to add various stat counters to posts/pages content using shortcodes and widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin10,480 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
CSS6801113,038
PHP202817292,781
SVG1002,671
JavaScript72102681,990

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity62.33
▷ Minimum class complexity6.00
▷ Maximum class complexity134.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods65
▷ Static methods1218.46%
▷ Public methods6396.92%
▷ Protected methods23.08%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants28
▷ Global constants1967.86%
▷ Class constants932.14%
▷ Public constants9100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 1.33MB with 0.78MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/googleplus.png1.91KB0.99KB▼ 48.06%
images/flicker.png1.45KB0.57KB▼ 60.47%
images/twitter.png1.74KB0.81KB▼ 53.33%
images/customize.png24.05KB8.41KB▼ 65.05%
images/theme.png52.01KB17.38KB▼ 66.59%