84% author-wordcount

Code Review | Author Wordcount

WordPress plugin Author Wordcount scored84%from 54 tests.

About plugin

  • Plugin page: author-wordcount
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2015
  • Latest release: May 26, 2016
  • Number of updates: 8
  • Update frequency: every 62.9 days
  • Top authors: sgrant (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,562 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.55ms] Passed 4 tests

Analyzing server-side resources used by Author Wordcount
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.84 ▲1.52
Dashboard /wp-admin3.34 ▲0.0344.93 ▼4.01
Posts /wp-admin/edit.php3.39 ▲0.0349.37 ▲1.83
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.33 ▲12.74
Media Library /wp-admin/upload.php3.26 ▲0.0334.67 ▼1.53
Author Wordcount /wp-admin/options-general.php?page=wp_author_wordcount3.2330.77

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_wp_author_wordcount
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Author Wordcount
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲5313.26 ▼1.041.81 ▼0.2940.95 ▲3.52
Dashboard /wp-admin2,209 ▲185.90 ▲0.9997.33 ▼5.8140.31 ▲0.24
Posts /wp-admin/edit.php2,098 ▲62.00 ▲0.0039.69 ▲1.3635.62 ▼0.15
Add New Post /wp-admin/post-new.php1,542 ▲818.65 ▼4.63643.96 ▼32.7356.00 ▲4.30
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0096.21 ▼4.3441.34 ▼6.25
Author Wordcount /wp-admin/options-general.php?page=wp_author_wordcount8272.0523.9525.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_wp_author_wordcount
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/author-wordcount/author-wordcount.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: writing, wordcount, author

author-wordcount/author-wordcount.php Passed 13 tests

"Author Wordcount" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
57 characters long description:
Allows authors to show word counts for works in progress.

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
Everything looks great! No dangerous files found in this plugin197 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12610169
CSS10028

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.37MB with 0.25MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png215.28KB68.18KB▼ 68.33%
screenshot-1.png165.50KB52.62KB▼ 68.21%