84% read-meter

Code Review | Read Meter - Reading Time & Progress Bar

WordPress plugin Read Meter - Reading Time & Progress Bar scored84%from 54 tests.

About plugin

  • Plugin page: read-meter
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Jun 17, 2019
  • Latest release: Aug 22, 2023
  • Number of updates: 26
  • Update frequency: every 58.8 days
  • Top authors: Nikschavan (53.85%)brainstormworg (50%)

Code review

54 tests

User reviews

18 reviews

Install metrics

10,000+ active /48,441 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼11.43ms] Passed 4 tests

This is a short check of server-side resources used by Read Meter - Reading Time & Progress Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2338.09 ▼3.85
Dashboard /wp-admin3.50 ▲0.1647.27 ▼17.80
Posts /wp-admin/edit.php3.62 ▲0.2650.16 ▲4.61
Add New Post /wp-admin/post-new.php6.10 ▲0.2286.40 ▼25.33
Media Library /wp-admin/upload.php3.42 ▲0.2038.07 ▲1.26
Read Meter /wp-admin/options-general.php?page=bsf_rt3.4234.26

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
db_upgraded
bsf_rt_progress_bar_settings
can_compress_scripts
theysaidso_admin_options
bsf_rt_general_settings
bsf_rt_read_time_settings
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Read Meter - Reading Time & Progress Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.69 ▼0.721.63 ▼0.2739.76 ▼4.32
Dashboard /wp-admin2,210 ▲194.87 ▲0.01107.13 ▲1.5337.37 ▼6.36
Posts /wp-admin/edit.php2,093 ▲72.05 ▲0.0433.69 ▼3.5235.81 ▲1.58
Add New Post /wp-admin/post-new.php1,531 ▲1722.97 ▲5.27661.95 ▼110.4362.87 ▲10.93
Media Library /wp-admin/upload.php1,395 ▲74.25 ▼0.0195.94 ▼13.4242.91 ▼3.07
Read Meter /wp-admin/options-general.php?page=bsf_rt8932.1926.6625.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • db_upgraded
    • bsf_rt_read_time_settings
    • bsf_rt_general_settings
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • bsf_rt_progress_bar_settings
    • widget_recent-comments
    • widget_recent-posts

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)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/read-meter/includes/bsf-rt-user-manual.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/read-meter/includes/bsf-rt-progress-bar-settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/read-meter/classes/class-bsfrt-readtime.php:88
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/read-meter/classes/class-bsfrt-loader.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/read-meter/includes/bsf-rt-read-time-settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/read-meter/includes/bsf-rt-main-frontend.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/read-meter/includes/bsf-rt-page.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/read-meter/bsf-readtime.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/read-meter/includes/bsf-rt-general-settings.php:10

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: readtime, progressbar

read-meter/bsf-readtime.php 85% from 13 tests

"Read Meter - Reading Time & Progress Bar" version 1.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Name the main plugin file the same as the plugin slug ("read-meter.php" instead of "bsf-readtime.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,688 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP95114001,459
JavaScript6785165
CSS517464

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity93.50
▷ Minimum class complexity38.00
▷ Maximum class complexity149.00
Average method complexity5.62
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin