84% post-admin-word-count

Code Review | Post Admin Word Count

WordPress plugin Post Admin Word Count scored84%from 54 tests.

About plugin

  • Plugin page: post-admin-word-c...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.1
  • WordPress version: 6.3.1
  • First release: Aug 11, 2012
  • Latest release: Aug 14, 2012
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: JonBishop (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /5,509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼11.28ms] Passed 4 tests

This is a short check of server-side resources used by Post Admin Word Count
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.21 ▼2.95
Dashboard /wp-admin3.32 ▲0.0139.79 ▼6.05
Posts /wp-admin/edit.php3.25 ▼0.1033.05 ▼13.78
Add New Post /wp-admin/post-new.php5.90 ▲0.0175.83 ▼22.32
Media Library /wp-admin/upload.php3.24 ▲0.0135.15 ▲2.10

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Admin Word Count
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.12 ▼1.291.81 ▲0.2438.53 ▼1.98
Dashboard /wp-admin2,206 ▲154.89 ▲0.03113.37 ▲6.9342.00 ▲1.17
Posts /wp-admin/edit.php2,119 ▲302.00 ▼0.0139.41 ▲1.2137.27 ▲3.18
Add New Post /wp-admin/post-new.php1,536 ▼623.28 ▲4.99620.25 ▼11.5257.57 ▲6.04
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0694.29 ▼1.4940.62 ▼2.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • pwc_last_checked
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 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 everything seems fine, this is not an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/post-admin-word-count/post-admin-word-count.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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 to be fixed:
  • Screenshots: Add an image for screenshot #1 (Word count on post list)
Please take inspiration from this readme.txt

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

The entry point to "Post Admin Word Count" version 1.2 is a PHP file that has certain tags in its header comment area
92 characters long description:
Adds a sortable column to the admin's post manager, displaying the word count for each post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected63 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1203463

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.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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png30.63KB15.03KB▼ 50.92%