84% post-word-count-in-admin

Code Review | Post word count in admin

WordPress plugin Post word count in admin scored84%from 54 tests.

About plugin

  • Plugin page: post-word-count-i...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 30, 2023
  • Latest release: Mar 30, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: shashidharkumar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /110 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.02MB] [CPU: ▼15.05ms] Passed 4 tests

Server-side resources used by Post word count in admin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0140.25 ▼1.04
Dashboard /wp-admin3.37 ▼0.0256.76 ▼14.94
Posts /wp-admin/edit.php3.31 ▼0.0939.52 ▼22.55
Add New Post /wp-admin/post-new.php5.95 ▲0.0287.16 ▼21.65
Media Library /wp-admin/upload.php3.29 ▲0.0236.85 ▲0.87

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
pwc_last_checked
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Post word count in admin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▲0.091.78 ▼0.0143.36 ▲2.38
Dashboard /wp-admin2,189 ▲185.54 ▼0.0888.79 ▼2.3240.94 ▼1.01
Posts /wp-admin/edit.php2,127 ▲302.14 ▲0.1135.25 ▼7.5035.14 ▼7.24
Add New Post /wp-admin/post-new.php1,526 ▼023.13 ▲0.07650.54 ▼35.7761.65 ▼7.17
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.01109.71 ▲10.0448.49 ▼1.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • pwc_last_checked
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/post-word-count-in-admin/post-word-count-in-admin.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === post-word-count-in-admin === )
  • Screenshots: Add an image for screenshot #1 (screenshot-1.png)
Please take inspiration from this readme.txt

post-word-count-in-admin/post-word-count-in-admin.php Passed 13 tests

"Post word count in admin" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
73 characters long description:
Adds a column to the admin's post manager that can also work as sortable.

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
Success! There were no dangerous files found in this plugin63 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1193863

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png4.95KB2.08KB▼ 57.94%