94% count-content-characters

Code Review | Content character count live

WordPress plugin Content character count live scored 94% from 54 tests.

About plugin

  • Plugin page: count-content-cha...
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.2.2
  • WordPress version: 5.8.1
  • First release: Oct 2, 2012
  • Latest release: Jun 4, 2015
  • Number of updates: 12
  • Update frequency: every 81.3 days
  • Top authors: o----o (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 3,001 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Content character count live
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1231.73 ▲9.01
Dashboard /wp-admin3.07 ▲0.0138.85 ▼7.63
Posts /wp-admin/edit.php3.12 ▲0.0135.49 ▼10.55
Add New Post /wp-admin/post-new.php5.43 ▼0.0091.21 ▼568.41
Media Library /wp-admin/upload.php3.01 ▲0.0032.36 ▼11.61

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Content character count live: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,693 ▲9715.76 ▲0.316.94 ▼3.4846.68 ▼5.91
Dashboard /wp-admin2,974 ▲435.85 ▼0.09145.89 ▼20.89109.67 ▼13.31
Posts /wp-admin/edit.php2,743 ▲42.69 ▼0.0164.17 ▼7.4292.44 ▼3.47
Add New Post /wp-admin/post-new.php1,607 ▼7618.91 ▲0.13367.64 ▼6.01113.64 ▲1.64
Media Library /wp-admin/upload.php1,811 ▲45.01 ▼0.00145.19 ▼8.57119.30 ▼9.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.62MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/count-content-characters/content-character-count.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Screenshot)
You can take inspiration from this readme.txt

count-content-characters/content-character-count.php 92% from 13 tests

The primary PHP file in "Content character count live" version 0.1.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("count-content-characters.php" instead of "content-character-count.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin93 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File35354
PHP151839

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
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%
Functions4
▷ Named functions4100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.74KB8.38KB▼ 59.61%