84% count-cwp

Code Review | Count Characters, Words and Paragraphs while typing

WordPress plugin Count Characters, Words and Paragraphs while typing scored84%from 54 tests.

About plugin

  • Plugin page: count-cwp
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Sep 6, 2021
  • Latest release: Oct 23, 2023
  • Number of updates: 15
  • Update frequency: every 51.7 days
  • Top authors: Yiannistaos (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /1,589 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.14MB] [CPU: ▼7.54ms] Passed 4 tests

A check of server-side resources used by Count Characters, Words and Paragraphs while typing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1236.86 ▼8.62
Dashboard /wp-admin3.44 ▲0.1446.50 ▼1.48
Posts /wp-admin/edit.php3.56 ▲0.2051.04 ▲3.08
Add New Post /wp-admin/post-new.php6.05 ▲0.1680.69 ▼21.69
Media Library /wp-admin/upload.php3.37 ▲0.1335.65 ▲1.65
Count CWP /wp-admin/options-general.php?page=count-cwp3.3429.97

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Count Characters, Words and Paragraphs while typing
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.15 ▼0.561.70 ▲0.0940.21 ▼3.63
Dashboard /wp-admin2,202 ▲285.67 ▲0.1282.93 ▼3.6935.54 ▼5.79
Posts /wp-admin/edit.php2,195 ▲952.07 ▼0.0740.00 ▲4.1935.58 ▲2.80
Add New Post /wp-admin/post-new.php1,536 ▲1023.10 ▼0.06649.54 ▲23.7656.34 ▲7.43
Media Library /wp-admin/upload.php1,407 ▲74.19 ▲0.0295.47 ▼2.0940.95 ▼2.94
Count CWP /wp-admin/options-general.php?page=count-cwp9922.0023.3628.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though everything seems fine, this is not 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 take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/count-cwp/uninstall.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/count-cwp/includes/class-w357-count-cwp.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/count-cwp/admin/settings-view.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: paragraphs, counter web357, count, words, spaces...

count-cwp/count-cwp.php 92% from 13 tests

The main PHP script in "Count Characters, Words and Paragraphs while typing" version 1.0.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 163 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected824 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP15138543588
CSS4210132
PO File1233294
JavaScript421210

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.20
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods3487.18%
▷ Protected methods00.00%
▷ Private methods512.82%
Functions3
▷ Named functions3100.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/web357-logo.png7.12KB2.83KB▼ 60.18%
admin/img/count-cwp-wordpress-plugin-120x200.png44.59KB9.90KB▼ 77.79%