79% counten-sale-counter-advanced

Code Review | Counten- Sale Counter Advanced

WordPress plugin Counten- Sale Counter Advanced scored79%from 54 tests.

About plugin

  • Plugin page: counten-sale-coun...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 24, 2023
  • Latest release: Jan 24, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: teconce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /110 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.58MB] [CPU: ▲11.46ms] Passed 4 tests

An overview of server-side resources used by Counten- Sale Counter Advanced
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.06 ▲1.6050.98 ▲10.37
Dashboard /wp-admin4.88 ▲1.5858.01 ▲7.43
Posts /wp-admin/edit.php4.93 ▲1.5770.89 ▲25.35
Add New Post /wp-admin/post-new.php7.48 ▲1.59103.63 ▲10.77
Media Library /wp-admin/upload.php4.80 ▲1.5749.09 ▲17.25
Counten Sale Counter /wp-admin/options-general.php?page=eddadv_options7.8652.40

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 162 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
eddadv_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Counten- Sale Counter Advanced
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲14914.81 ▲0.236.26 ▲4.3438.65 ▼2.73
Dashboard /wp-admin2,233 ▲485.97 ▲0.15118.39 ▲14.3744.02 ▲0.69
Posts /wp-admin/edit.php2,116 ▲242.67 ▲0.6243.26 ▲3.6836.27 ▲2.54
Add New Post /wp-admin/post-new.php1,530 ▲1617.99 ▲0.48668.03 ▼11.4035.55 ▼23.40
Media Library /wp-admin/upload.php1,412 ▲245.18 ▲0.95103.93 ▲2.1740.31 ▼4.54
Counten Sale Counter /wp-admin/options-general.php?page=eddadv_options1,5014.8455.2881.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • eddadv_options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/counten-sale-counter-advanced/admin/partials/counten-sale-counter-advanced-admin-display.php
    • > /wp-content/plugins/counten-sale-counter-advanced/public/partials/counten-sale-counter-advanced-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'COUNTEN_Fields' not found in wp-content/plugins/counten-sale-counter-advanced/admin/partials/edd-adv-custom-csf.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: sale counter, easy digital downloads, edd, sale

counten-sale-counter-advanced/counten-sale-counter-advanced.php Passed 13 tests

The main PHP file in "Counten- Sale Counter Advanced" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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 plugin47,549 lines of code in 133 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript94,4442,84220,717
PHP812,7571,6667,783
CSS74955816,875
PO File203,1983,5916,500
Sass1697035,674

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity23.00
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity6.46
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes71
▷ Abstract classes22.82%
▷ Concrete classes6997.18%
▷ Final classes00.00%
Methods286
▷ Static methods4114.34%
▷ Public methods27696.50%
▷ Protected methods20.70%
▷ Private methods82.80%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/vendors/counten-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%