84% word-count-and-limit

Code Review | WordPress Word Count and Limit

WordPress plugin WordPress Word Count and Limit scored84%from 54 tests.

About plugin

  • Plugin page: word-count-and-limit
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 6.3.1
  • First release: Apr 30, 2014
  • Latest release: Oct 24, 2019
  • Number of updates: 35
  • Update frequency: every 57.2 days
  • Top authors: jojaba (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /9,590 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.51MB] [CPU: ▼11.54ms] Passed 4 tests

Analyzing server-side resources used by WordPress Word Count and Limit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1140.84 ▲1.39
Dashboard /wp-admin3.42 ▲0.1144.34 ▼1.21
Posts /wp-admin/edit.php3.53 ▲0.1744.64 ▼3.07
Add New Post /wp-admin/post-new.php3.49 ▼2.3954.13 ▼43.28
Media Library /wp-admin/upload.php3.34 ▲0.1138.93 ▲5.17
Word Count and Limit /wp-admin/options-general.php?page=wpwcl_options_page3.3129.32

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Word Count and Limit
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.32 ▼1.434.15 ▲2.4239.98 ▼0.36
Dashboard /wp-admin2,213 ▲285.80 ▼0.2198.69 ▼7.2836.69 ▼10.46
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0534.33 ▼5.8332.30 ▼4.96
Add New Post /wp-admin/post-new.php3,142 ▲1,6057.76 ▼10.52208.08 ▼405.6472.67 ▲25.49
Media Library /wp-admin/upload.php1,395 ▲44.19 ▼0.03103.56 ▲8.7245.12 ▲3.40
Word Count and Limit /wp-admin/options-general.php?page=wpwcl_options_page1,1281.8625.5732.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/word-count-and-limit/word-count-and-limit.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: limit, count, words, characters

word-count-and-limit/word-count-and-limit.php Passed 13 tests

The main file in "WordPress Word Count and Limit" v. 1.4.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
116 characters long description:
Dynamically counts the words in edit post window and limit the character count if needed for one or more user roles.

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
Good job! No executable or dangerous file extensions detected697 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP180119511
PO File14958186

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions21
▷ Named functions21100.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
No PNG files were detected