83% yas-counter-for-elementor

Code Review | YAS Counter For Elementor

WordPress plugin YAS Counter For Elementor scored83%from 54 tests.

About plugin

  • Plugin page: yas-counter-for-e...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2023
  • Latest release: Oct 12, 2023
  • Number of updates: 7
  • Update frequency: every 1.3 days
  • Top authors: mahedipro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /33 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by YAS Counter For Elementor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.54 ▼6.32
Dashboard /wp-admin3.33 ▼0.0146.46 ▼15.08
Posts /wp-admin/edit.php3.38 ▲0.0343.19 ▼3.72
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.00 ▼8.59
Media Library /wp-admin/upload.php3.25 ▲0.0234.43 ▲0.10

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for YAS Counter For Elementor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲11113.42 ▼1.307.81 ▲5.5949.43 ▼6.22
Dashboard /wp-admin2,209 ▲295.58 ▲0.0485.36 ▼8.4836.40 ▼6.54
Posts /wp-admin/edit.php2,111 ▲111.99 ▼0.0337.48 ▲1.5034.60 ▼2.36
Add New Post /wp-admin/post-new.php1,540 ▲1223.39 ▲0.48595.75 ▼0.0662.29 ▼34.50
Media Library /wp-admin/upload.php1,414 ▲144.20 ▲0.00103.06 ▼1.2845.48 ▲1.94

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/yas-counter-for-elementor/widget.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Screenshot_1.png), #2 (Screenshot_2.png), #3 (Screenshot_3.png)
Please take inspiration from this readme.txt

yas-counter-for-elementor/yas-counter.php 85% from 13 tests

The main file in "YAS Counter For Elementor" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yas-counter-for-elementor.php" instead of "yas-counter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin428 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3103271324
CSS14090
JavaScript11014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.00
▷ Minimum class complexity3.00
▷ Maximum class complexity9.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods21
▷ Static methods14.76%
▷ Public methods1990.48%
▷ Protected methods29.52%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin