83% word-reading-time-counter

Code Review | Word & Reading Time Counter

WordPress plugin Word & Reading Time Counter scored83%from 54 tests.

About plugin

  • Plugin page: word-reading-time...
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 6.3.1
  • First release: Aug 30, 2019
  • Latest release: May 18, 2021
  • Number of updates: 7
  • Update frequency: every 89.7 days
  • Top authors: largbasket (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.26ms] Passed 4 tests

This is a short check of server-side resources used by Word & Reading Time Counter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.26 ▼0.47
Dashboard /wp-admin3.32 ▲0.0141.95 ▼7.14
Posts /wp-admin/edit.php3.37 ▲0.0142.28 ▼6.16
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.36 ▼11.26
Media Library /wp-admin/upload.php3.24 ▲0.0132.21 ▲0.72

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Word & Reading Time Counter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.53 ▲0.251.76 ▲0.1744.45 ▲3.83
Dashboard /wp-admin2,198 ▲245.61 ▼0.0283.90 ▲0.5538.10 ▼6.06
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0233.25 ▼5.3635.14 ▲0.34
Add New Post /wp-admin/post-new.php1,526 ▼723.14 ▼0.11603.29 ▲4.4956.50 ▲0.32
Media Library /wp-admin/upload.php1,394 ▼34.19 ▼0.0599.24 ▲0.6440.08 ▼3.57

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 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/word-reading-time-counter/word_and_reading_time_counter.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Screenshot-1), #2 (Screenshot-2), #3 (Screenshot-3)
Please take inspiration from this readme.txt

word-reading-time-counter/word_and_reading_time_counter.php 77% from 13 tests

The main file in "Word & Reading Time Counter" v. 1.5.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("word-reading-time-counter.php" instead of "word_and_reading_time_counter.php")

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

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions3
▷ Named functions3100.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