89% wp-file-word-counter

Code Review | WordPress File Word Counter

WordPress plugin WordPress File Word Counter scored89%from 54 tests.

About plugin

  • Plugin page: wp-file-word-counter
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.2
  • WordPress version: 6.3.1
  • First release: Feb 2, 2018
  • Latest release: Feb 14, 2018
  • Number of updates: 10
  • Update frequency: every 1.3 days
  • Top authors: anuragsharma1986.22 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /955 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.13MB] [CPU: ▼3.46ms] Passed 4 tests

This is a short check of server-side resources used by WordPress File Word Counter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.92 ▼8.50
Dashboard /wp-admin3.43 ▲0.1356.29 ▲1.46
Posts /wp-admin/edit.php3.54 ▲0.1955.83 ▼0.89
Add New Post /wp-admin/post-new.php6.01 ▲0.1394.91 ▼5.92
Media Library /wp-admin/upload.php3.35 ▲0.1338.77 ▲3.80

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress File Word Counter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,991 ▲23013.58 ▼0.9817.03 ▲15.1239.33 ▼3.11
Dashboard /wp-admin2,195 ▲185.62 ▼0.0592.33 ▼5.6142.38 ▼2.02
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0240.13 ▲5.3335.29 ▲1.70
Add New Post /wp-admin/post-new.php1,526 ▼223.12 ▲0.12660.44 ▼26.4155.01 ▼5.41
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0193.98 ▼12.5642.24 ▼5.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Donate link: Please fix this invalid URI: "#"
  • Screenshots: Screenshot #1 (Place the shortcode on page or widget and uploader will display on the frontend.) image not found
The official readme.txt is a good inspiration

wp-file-word-counter/wp-file-word-counter.php 92% from 13 tests

This is the main PHP file of "WordPress File Word Counter" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected822 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP11336340635
CSS180148
JavaScript23339

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.25
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods46
▷ Static methods24.35%
▷ Public methods2656.52%
▷ Protected methods00.00%
▷ Private methods2043.48%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin