78% minimum-word-count

Code Review | Minimum Word Count

WordPress plugin Minimum Word Count scored 78% from 54 tests.

About plugin

  • Plugin page: minimum-word-count
  • Plugin version: 0.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 5.8.1
  • First release: Oct 1, 2012
  • Latest release: Oct 1, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ClearCode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 2,942 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼141.96ms] Passed 4 tests

An overview of server-side resources used by Minimum Word Count
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0450.41 ▲5.84
Dashboard /wp-admin3.10 ▲0.0469.38 ▲8.84
Posts /wp-admin/edit.php3.19 ▲0.0862.77 ▼7.46
Add New Post /wp-admin/post-new.php5.46 ▲0.02121.55 ▼554.01
Media Library /wp-admin/upload.php3.04 ▲0.0436.03 ▼12.20
Min Word Count /wp-admin/options-general.php?page=mwc_admin2.9939.93

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 3 new options
New WordPress options
mwc_warnings
minimum_word_count_min
mwc_errors

Browser metrics Passed 4 tests

An overview of browser requirements for Minimum Word Count
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,694 ▲12215.83 ▲0.1611.53 ▲1.6357.51 ▲2.45
Dashboard /wp-admin2,969 ▲385.97 ▲0.02178.11 ▲21.40133.08 ▲15.95
Posts /wp-admin/edit.php2,759 ▲202.71 ▼0.0091.15 ▲14.4495.17 ▼7.07
Add New Post /wp-admin/post-new.php1,623 ▲4221.46 ▲4.00322.85 ▼236.19109.13 ▼43.61
Media Library /wp-admin/upload.php1,753 ▼515.01 ▼0.01190.37 ▼17.35138.77 ▼77.68
Min Word Count /wp-admin/options-general.php?page=mwc_admin1,1992.1067.2990.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 3 options in the database
    • mwc_warnings
    • minimum_word_count_min
    • mwc_errors

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=mwc_admin
    • > Notice in wp-content/plugins/minimum-word-count/minimum-word-count.php+145
    Undefined variable: mwc_updated

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/minimum-word-count/minimum-word-count.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Administration settings), #2 (Word Count column), #3 (Live Word Count)
The official readme.txt is a good inspiration

minimum-word-count/minimum-word-count.php Passed 13 tests

The entry point to "Minimum Word Count" version 0.7.0 is a PHP file that has certain tags in its header comment area
54 characters long description:
Set the minimum word count required to publish a post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin231 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15220203
JavaScript191228

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.16MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png61.71KB55.47KB▼ 10.12%
screenshot-2.png48.85KB31.33KB▼ 35.86%
screenshot-1.png56.75KB23.02KB▼ 59.44%