83% word-and-character-counter

Code Review | Name: Word Counter

WordPress plugin Name: Word Counterscored83%from 54 tests.

About plugin

  • Plugin page: word-and-characte...
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 21, 2012
  • Latest release: Dec 21, 2012
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: faragas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,304 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 gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.29ms] Passed 4 tests

An overview of server-side resources used by Name: Word Counter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.98 ▼1.97
Dashboard /wp-admin3.31 ▼0.0342.07 ▼17.44
Posts /wp-admin/edit.php3.36 ▲0.0143.96 ▼2.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.45 ▼6.84
Media Library /wp-admin/upload.php3.23 ▲0.0034.19 ▼0.77

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Name: Word Counter: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.19 ▼1.241.83 ▲0.2639.12 ▲2.48
Dashboard /wp-admin2,206 ▲174.87 ▼1.0497.14 ▼10.1740.53 ▼3.42
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0132.85 ▼1.9634.07 ▼1.88
Add New Post /wp-admin/post-new.php1,533 ▲1423.22 ▲0.19594.08 ▼75.2641.83 ▼23.19
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0592.15 ▼7.4842.16 ▼2.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/word-and-character-counter/count-word.com.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Name: Word Counter=== )
  • Contributors: The plugin contributors field is not present
  • Requires at least: Invalid version format
Please take inspiration from this readme.txt

word-and-character-counter/count-word.com.php 92% from 13 tests

Analyzing the main PHP file in "Name: Word Counter" version 1.00
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("word-and-character-counter.php" instead of "count-word.com.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151149

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin