84% simple-word-count-and-reading-time

Code Review | Simple Word Count and Reading time

WordPress plugin Simple Word Count and Reading time scored84%from 54 tests.

About plugin

  • Plugin page: simple-word-count...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2016
  • Latest release: Jan 28, 2016
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: psdtohtmlguru (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,562 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
Install script ran successfully

Server metrics [RAM: ▼0.69MB] [CPU: ▼14.33ms] Passed 4 tests

A check of server-side resources used by Simple Word Count and Reading time
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.42 ▲0.25
Dashboard /wp-admin3.31 ▲0.0150.75 ▼2.10
Posts /wp-admin/edit.php3.36 ▲0.0150.42 ▲1.43
Add New Post /wp-admin/post-new.php3.10 ▼2.7935.54 ▼56.89
Media Library /wp-admin/upload.php3.23 ▲0.0137.56 ▲1.64

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Word Count and Reading time
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲13714.01 ▼0.305.31 ▲3.3641.38 ▼4.63
Dashboard /wp-admin2,206 ▲184.84 ▼1.00105.03 ▼11.7339.24 ▼5.10
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0036.75 ▲1.1032.55 ▼2.47
Add New Post /wp-admin/post-new.php1,533 ▲1423.08 ▼0.15629.92 ▼24.0757.98 ▲0.10
Media Library /wp-admin/upload.php1,391 ▲64.13 ▼0.0795.03 ▼7.8343.82 ▼0.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-word-count-and-reading-time/index.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

simple-word-count-and-reading-time/index.php 92% from 13 tests

The entry point to "Simple Word Count and Reading time" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-word-count-and-reading-time.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin115 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2361690
JavaScript110425

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected