84% post-words-count

Code Review | Post Words Counter and Thumbnail Checker

WordPress plugin Post Words Counter and Thumbnail Checker scored84%from 54 tests.

About plugin

  • Plugin page: post-words-count
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 12, 2019
  • Latest release: Nov 11, 2023
  • Number of updates: 18
  • Update frequency: every 86.3 days
  • Top authors: binsaifullah (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

3,000+ active /11,949 total downloads

Benchmarks

Plugin footprint 83% from 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.07MB] [CPU: ▼3.17ms] Passed 4 tests

An overview of server-side resources used by Post Words Counter and Thumbnail Checker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.79 ▼2.57
Dashboard /wp-admin3.39 ▲0.0845.54 ▼3.87
Posts /wp-admin/edit.php3.50 ▲0.1550.55 ▲6.44
Add New Post /wp-admin/post-new.php5.99 ▲0.1082.52 ▼10.07
Media Library /wp-admin/upload.php3.31 ▲0.0836.11 ▲3.82
Post Words Counter /wp-admin/tools.php?page=post-words-count3.2932.08

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

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

Browser metrics Passed 4 tests

Post Words Counter and Thumbnail Checker: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲5414.33 ▼0.101.73 ▼0.2038.21 ▼1.32
Dashboard /wp-admin2,249 ▲725.65 ▼0.0295.99 ▲5.1240.12 ▲2.62
Posts /wp-admin/edit.php2,175 ▲752.13 ▲0.1141.52 ▲3.2935.38 ▼0.62
Add New Post /wp-admin/post-new.php1,571 ▲4223.17 ▲0.07680.90 ▲77.5050.41 ▼4.39
Media Library /wp-admin/upload.php1,445 ▲454.21 ▲0.0597.71 ▼1.8846.25 ▲3.81
Post Words Counter /wp-admin/tools.php?page=post-words-count9682.0023.5354.21

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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

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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-words-count/admin/admin.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

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
These attributes need your attention: You can look at the official readme.txt

post-words-count/post-words-count.php 92% from 13 tests

"Post Words Counter and Thumbnail Checker" version 2.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 152 characters long)

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
Everything looks great! No dangerous files found in this plugin676 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP694170473
CSS2290171
JavaScript12032

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.33
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.14MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/screenshot-1.png145.60KB46.92KB▼ 67.78%