84% character-count-for-post-content-excerpt

Code Review | Character Count for Post Content & Excerpt

WordPress plugin Character Count for Post Content & Excerpt scored84%from 54 tests.

About plugin

  • Plugin page: character-count-f...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2014
  • Latest release: Jun 13, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: cadeyrn (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /3,938 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
Installer ran successfully

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

Server-side resources used by Character Count for Post Content & Excerpt
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.18 ▼3.20
Dashboard /wp-admin3.31 ▼0.0349.20 ▼21.03
Posts /wp-admin/edit.php3.36 ▲0.0147.55 ▼3.32
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.05 ▼22.74
Media Library /wp-admin/upload.php3.24 ▲0.0135.61 ▼2.34

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Character Count for Post Content & Excerpt
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.351.78 ▼0.2542.85 ▼0.87
Dashboard /wp-admin2,195 ▲185.57 ▲0.0384.85 ▼14.7940.15 ▼5.59
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0441.12 ▲5.3436.45 ▼0.64
Add New Post /wp-admin/post-new.php1,530 ▲422.98 ▼0.50642.17 ▲8.9357.40 ▲7.89
Media Library /wp-admin/upload.php1,403 ▼04.21 ▲0.0297.07 ▼8.8944.08 ▼0.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/character-count-for-post-content-excerpt/content_excerpt_count.php:16

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: content, character count, excerpt

character-count-for-post-content-excerpt/content_excerpt_count.php 92% from 13 tests

The main file in "Character Count for Post Content & Excerpt" v. 0.1 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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("character-count-for-post-content-excerpt.php" instead of "content_excerpt_count.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 plugin58 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1151239
Markdown18019

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin